Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: OpenStack: Dev

[Ceilometer] filter event samples

 

 

OpenStack dev RSS feed   Index | Next | Previous | View Threaded


abarabesi at enter

Aug 6, 2013, 10:01 AM

Post #1 of 5 (46 views)
Permalink
[Ceilometer] filter event samples

Hi everybody,

is there a way to avoid event samples from list of samples and statistics?

I use statistics to measure the time a group of resources has existed.

For example, in order to measure how many instances of a given flavor existed in a day I use the following query

http://10.10.10.10:8777/v2/meters/instance:flavor/statistics

{
"q": [.{
"field": "project_id",
"op": "eq",
"value": "cdac83aebbfa45498856fe1fb26378ff"
},
{
"field": "timestamp",
"op": "ge",
"value": "2013-08-01T00:00:00"
},
{
"field": "timestamp",
"op": "lt",
"value": "2013-08-02T00:00:00"

}]
}

The "count" (or "sum") value returned will give me the instances per minute, which I use for billing.

The problem is that statistics count all samples therefore all event samples contribute to the values
returned, which is not good for what I need to do (there is at least one 'compute.instance.exists' sample
per instance per hour plus other possible events). So it would be great if I could avoid event samples.


Thanks
Alex



_______________________________________________
Mailing list: http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack
Post to : openstack [at] lists
Unsubscribe : http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack


julien at danjou

Aug 6, 2013, 11:59 PM

Post #2 of 5 (38 views)
Permalink
Re: [Ceilometer] filter event samples [In reply to]

On Tue, Aug 06 2013, Alessandro Barabesi wrote:

> The problem is that statistics count all samples therefore all event
> samples contribute to the values returned, which is not good for what
> I need to do (there is at least one 'compute.instance.exists' sample
> per instance per hour plus other possible events). So it would be
> great if I could avoid event samples.

No there's no way, and that wouldn't be the best possible solution out
there since you could still have other events you wouldn't know.
IIUC, grouping statistics by resource_id would solve your problem, and
we're working on that for Havana.

--
Julien Danjou
-- Free Software hacker - freelance consultant
-- http://julien.danjou.info
Attachments: signature.asc (0.82 KB)


abarabesi at enter

Aug 7, 2013, 12:54 AM

Post #3 of 5 (38 views)
Permalink
Re: [Ceilometer] filter event samples [In reply to]

Hi Julien

grouping statistics by resource_id would not help, I have the same problem even if I ask statistics for a single resource_id, what I need to
do is bill customers on the number of instances, therefore I need to know how many instances existed during a certain period of time,
I can count the number of instances per minute counting the samples (via ceilometer statistics) but I will always get a wrong count since
ceilometer collects one sample per minute via the pollster plus the notification samples. Any suggestions on an alternative way of doing it?

Thanks
Alex

-----Original Message-----
From: Julien Danjou [mailto:julien [at] danjou]
Sent: mercoledì 7 agosto 2013 08:59
To: Alessandro Barabesi
Cc: openstack [at] lists
Subject: Re: [Openstack] [Ceilometer] filter event samples

On Tue, Aug 06 2013, Alessandro Barabesi wrote:

> The problem is that statistics count all samples therefore all event
> samples contribute to the values returned, which is not good for what
> I need to do (there is at least one 'compute.instance.exists' sample
> per instance per hour plus other possible events). So it would be
> great if I could avoid event samples.

No there's no way, and that wouldn't be the best possible solution out there since you could still have other events you wouldn't know.
IIUC, grouping statistics by resource_id would solve your problem, and we're working on that for Havana.

--
Julien Danjou
-- Free Software hacker - freelance consultant
-- http://julien.danjou.info
_______________________________________________
Mailing list: http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack
Post to : openstack [at] lists
Unsubscribe : http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack


julien at danjou

Aug 7, 2013, 1:01 AM

Post #4 of 5 (34 views)
Permalink
Re: [Ceilometer] filter event samples [In reply to]

On Wed, Aug 07 2013, Alessandro Barabesi wrote:

> grouping statistics by resource_id would not help, I have the same problem
> even if I ask statistics for a single resource_id, what I need to
> do is bill customers on the number of instances, therefore I need to know
> how many instances existed during a certain period of time,

That's where grouping statistics by resource_id; you would have a
statistics results per resource_id, so counter the number of statistics
will give you the number of instance, and you would have the exact
duration for each one of these.

--
Julien Danjou
;; Free Software hacker ; freelance consultant
;; http://julien.danjou.info
Attachments: signature.asc (0.82 KB)


abarabesi at enter

Aug 8, 2013, 1:19 AM

Post #5 of 5 (32 views)
Permalink
Re: [Ceilometer] filter event samples [In reply to]

Got it, thanks very much.

Alex

-----Original Message-----
From: Julien Danjou [mailto:julien [at] danjou]
Sent: mercoledì 7 agosto 2013 10:02
To: Alessandro Barabesi
Cc: openstack [at] lists
Subject: Re: [Openstack] [Ceilometer] filter event samples

On Wed, Aug 07 2013, Alessandro Barabesi wrote:

> grouping statistics by resource_id would not help, I have the same
> problem even if I ask statistics for a single resource_id, what I need
> to do is bill customers on the number of instances, therefore I need
> to know how many instances existed during a certain period of time,

That's where grouping statistics by resource_id; you would have a statistics results per resource_id, so counter the number of statistics will give you the number of instance, and you would have the exact duration for each one of these.

--
Julien Danjou
;; Free Software hacker ; freelance consultant ;; http://julien.danjou.info
_______________________________________________
Mailing list: http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack
Post to : openstack [at] lists
Unsubscribe : http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack

OpenStack dev RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.