[Openstack] [Metering] Help on the Information about the timestamps notion in ceilometer
Deepak Bangalore Hariyanna
dbangalo at usc.edu
Wed Jul 31 21:12:59 UTC 2013
Hi All,
I had some doubts in the ceilometer timestamp field.
A couple of experimentation I did with it is resulting in conflicting
results and I feel I am missing something here.
Could anyone please help me clarify this.
As per the V2 specs, every timestamp recorded/queried is in UTC
This implies the timestamp in the queries I make, must also be in UTC.(i.e
timestamp>UTCTIME(A) and timestamp<UTCTIME(B))
When I specify the period to be 86400s (i.e I am querying to collect the
statistics data on a day period basis), I observe that the period_end and
period_start are not at 00.00.00. i.e not at the daytime boundary.
Instead, I observe that the period_start/end time starts from 7.00am (I am
in PDT), which means the data is in UTC, and as an example it when it
reports 7/15/2013, 00:07:00, it means 7/15/2013, 00:00:00 PDT time.
But however, I am in doubt for the TIMESTAMP I specify in the query
information.
I intend to get the usage details for the day between 7/15/2013 00:00:00
and 7/16/2013:00:00:00. I am interested in my machine detais which are in
PDT
1). If I specify the query to have timestamp > 7/15/2013, *00:00:00*(Isnt
this the PDT time midnight), the period_start and period_end timestamp have
values starting at *7.00am*(which is right though I specified the input
query without UTC converted time )
Example:
*curl -H 'X-Auth-Token: '$TOKEN'' "
http://localhost:8777/v2/meters/vcpus/statistics?q.field=timestamp&q.op=gt&q.value=2013-07-16T
00:00:00&q.field=timestamp&q.op=lt&q.value=2013-07-17T00:00:00
&q.field=user_id&q.op=eq&q.value=374b853b7bd34212b061d3d03ea4d71a&period=86400"
*
One of the stats result:
{
"sum": 7,
"avg": 1,
"period_start": "2013-07-15T*07:00:00*",
"count": 7,
"duration_start": "2013-07-16T00:00:39.467000",
"min": 1,
"max": 1,
"duration_end": "2013-07-16T06:00:42.637000",
"period": 86400,
"period_end": "2013-07-16T*07:00:00*",
"duration": 21603.17
}
2). If I specify the query to have timestamp > 7/15/2013, *07:00:00*(UTC
time for 7/15/13,00:00:00PDT), the period_start and end timestamp have
values starting at *14:00:00* (which I believe is wrong though I specified
the input query with the right timestamp conversion)
Example:
* curl -H 'X-Auth-Token: '$TOKEN'' "
http://localhost:8777/v2/meters/vcpus/statistics?q.field=timestamp&q.op=gt&q.value=2013-07-16T07:00:00&q.field=timestamp&q.op=lt&q.value=2013-07-17T07:00:00&q.field=user_id&q.op=eq&q.value=374b853b7bd34212b061d3d03ea4d71a&period=86400
" *
*
*
One of the stats result:
{
"sum": 7,
"avg": 1,
"period_start": "2013-07-15T*14:00:00*",
"count": 7,
"duration_start": "2013-07-16T07:00:37.546000",
"min": 1,
"max": 1,
"duration_end": "2013-07-16T13:00:08.729000",
"period": 86400,
"period_end": "2013-07-16T*14:00:00*",
"duration": 21571.183
}
I am not able to wrap my head around with this concept.
Could anyone please help me in getting this concept resolved?
Thanks,
Deepak
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack/attachments/20130731/9935a537/attachment.html>
More information about the Openstack
mailing list