Ask Your Question

Adding a new ceilometer meter

asked 2016-04-28 00:05:09 -0500

itsme gravatar image

I need to add a new ceilometer meter for getting the tenants (or) Projects from the openstack keystone.

keystone tenant-list will be returning the list of active tenants.

I need to add the result of tenant-list to the ceilometer meter.

There is already existing meter similar to the same is identity.project.created, identity.project.deleted etc.,

Likewise, I need to add the identity.project.all which will return all tenants available.

Someone let me know the way for achieving the same.

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted

answered 2016-04-28 01:49:17 -0500

yprokule gravatar image

@itsme, all the aforementioned meters are derived from keystone notifications. Hence U need to work with keystone community regarding extending existing notifications.

Also, U can try create your own plugin -

Or, create a simple shell script that will calculate active tenants and submit data to ceilometer via ceilometer sample-create command.

edit flag offensive delete link more


Thanks for your comments, Can you please explain how we can frame the Shell script, or show me any sample shell script if you have anything.

itsme gravatar imageitsme ( 2016-04-28 05:53:43 -0500 )edit

Hope this will help U to get the overall idea and adjust according:

ceilometer sample-create --resource-id ActiveTenant-Resource --meter-name all-tenants --meter-type gauge --meter-unit tenant --sample-volume $( keystone tenant-list 2>/dev/null | grep -v ^+ | grep -v enabled | wc -l )

yprokule gravatar imageyprokule ( 2016-04-29 01:51:49 -0500 )edit

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower


Asked: 2016-04-28 00:05:09 -0500

Seen: 130 times

Last updated: Apr 28 '16