incubator-cloudstack-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mukesh Kumar <m.ku...@leaseweb.com>
Subject RE: CS 4.0, cloud-usage server calculates all data except network usage
Date Wed, 19 Dec 2012 08:12:02 GMT
Dear Kishan
Yes, the guest Vm is in Isolated network

Name: DefaultIsolatedNetworkOfferingWithSourceNatService
Description: Offering for Isolated networks with Source Nat service enabled



-----Original Message-----
From: Kishan Kavala [mailto:Kishan.Kavala@citrix.com] 
Sent: woensdag, 19 december, 2012 07:01
To: cloudstack-dev@incubator.apache.org
Subject: RE: CS 4.0, cloud-usage server calculates all data except network usage

Mukesh,
  Traffic stats are fetched from VirtualRouter only in Isolated network case. Can you confirm
that your guest Vms are in Isolated network? For shared networks, CS is integrated with Traffic
Sentinel to collect network statistics.

~Kishan

-----Original Message-----
From: Mukesh Kumar [mailto:m.kumar@leaseweb.com] 
Sent: Tuesday, 18 December 2012 11:10 PM
To: cloudstack-dev@incubator.apache.org
Subject: CS 4.0, cloud-usage server calculates all data except network usage


Dear Devs,
We are not able to find any Network Usage data with our new setup using CloudStack 4.0 (usage
server installed).  All other statistics are fine except type 4 & 5, Can that be configuration
issue?

Our usage settings are:
enable.usage.server: true	
usage.aggregation.timezone: GMT
usage.execution.timezone:
usage.sanity.check.interval: 
usage.stats.job.aggregation.range: 5 (During testing phase, it'll be 1440 on live)
usage.stats.job.exec.time: 15:28

I generated a lot of traffic on one of the instance (called: MUKR-Cloud01-i002) & used
the following API commands

generateUsageRecords&response=json&startdate=2012-12-01&enddate=2012-12-19
Resulted: 
class stdClass#1 (1) {
  public $generateusagerecordsresponse =>
  class stdClass#2 (1) {
    public $success =>
    string(4) "true"
  }
}

However, listUsageRecords&response=json&startdate=2012-12-01&enddate=2012-12-19&type=5
(or type 4)
Resulting:
class stdClass#1 (1) {
  public $listusagerecordsresponse =>
  class stdClass#2 (0) {
  }
}

Furthermore, I looked into Management logs, Usage log & Tables. Here is the summary

Traffic generated on instance at 2012-12-18 17:28:43, using admin account (id: 2):
root@MUKR-Cloud01-i002:~# wget http://mirror.leaseweb.com/speedtest/500mb.bin /dev/null
--2012-12-18 17:28:43--  http://mirror.leaseweb.com/speedtest/500mb.bin
Resolving mirror.leaseweb.com (mirror.leaseweb.com)... 94.75.223.121, 2001:1af8:4030:1:0:dead:beef:cafe
Connecting to mirror.leaseweb.com (mirror.leaseweb.com)|94.75.223.121|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 500000000 (477M) [application/octet-stream] Saving to: `500mb.bin'

100%[=============================================================================================================>]
500,000,000 6.00M/s   in 51s

Usage Log (during the same time interval):
...
2012-12-18 16:38:00,056 DEBUG [usage.parser.VMInstanceUsageParser] (Usage-Job-1:null) Creating
VM usage record for vm: SDA-01, type: 2, usage: 0.166667, startDate: Tue Dec 18 17:28:00 CET
2012, endDate: Tue Dec 18 17:38:00 CET 2012, for account: 2
2012-12-18 16:38:00,058 DEBUG [usage.parser.NetworkUsageParser] (Usage-Job-1:null) Parsing
all Network usage events for account: 2
2012-12-18 16:38:00,059 DEBUG [usage.parser.NetworkUsageParser] (Usage-Job-1:null) No usage
record (0 bytes used) generated for account: 2
2012-12-18 16:38:00,059 DEBUG [usage.parser.NetworkUsageParser] (Usage-Job-1:null) No usage
record (0 bytes used) generated for account: 2 ...

mysql> select * from  usage_network;
+------------+---------+---------+--------------+------------+------------+----------------+--------------------+----------------+-------------------+
| account_id | zone_id | host_id | host_type    | network_id | bytes_sent | bytes_received
| agg_bytes_received | agg_bytes_sent | event_time_millis |
+------------+---------+---------+--------------+------------+------------+----------------+--------------------+----------------+-------------------+
|          2 |       1 |       4 | DomainRouter |        204 |          0 |              0
|                  0 |              0 |     1355846880002 |
|          2 |       1 |       4 | DomainRouter |        204 |          0 |              0
|                  0 |              0 |     1355847073495 |
|          2 |       1 |       4 | DomainRouter |        204 |          0 |              0
|                  0 |              0 |     1355847480003 |
|          2 |       1 |       4 | DomainRouter |        204 |          0 |              0
|                  0 |              0 |     1355847673495 |
|          2 |       1 |       4 | DomainRouter |        204 |          0 |              0
|                  0 |              0 |     1355848080002 |
|          2 |       1 |       4 | DomainRouter |        204 |          0 |              0
|                  0 |              0 |     1355848680002 |
|          2 |       1 |       4 | DomainRouter |        204 |          0 |              0
|                  0 |              0 |     1355848693495 |
|          2 |       1 |       6 | DomainRouter |        205 |          0 |              0
|                  0 |              0 |     1355847480003 |
|          2 |       1 |       6 | DomainRouter |        205 |          0 |              0
|                  0 |              0 |     1355847673495 |
|          2 |       1 |       6 | DomainRouter |        205 |          0 |              0
|                  0 |              0 |     1355848080002 |
|          2 |       1 |       6 | DomainRouter |        205 |          0 |              0
|                  0 |              0 |     1355848680002 |
|          2 |       1 |       6 | DomainRouter |        205 |          0 |              0
|                  0 |              0 |     1355848693495 |
+------------+---------+---------+--------------+------------+------------+----------------+--------------------+----------------+-------------------+

mysql> select * from cloud_usage where usage_type in (4, 5);
Empty set (0.00 sec)



If you need any other info, please reply.

Cheers
/Mukesh

Mime
View raw message