[openstack-dev] [Ceilometer]: Instance creation and deletion metrics in ceilometer !

Raghunath D raghunath.d at tcs.com
Tue Nov 1 09:30:25 UTC 2016


Hi,


what meters are you looking for specifically? as Ganpat mentioned, we 
only derive a few meters from Nova notifications[1]. i don't understand 
your comment about being able to see events on kafka. by 'events' do you 
mean Ceilometer Events[2]?

[1] 
https://github.com/openstack/ceilometer/blob/master/ceilometer/meter/data/meters.yaml#L83-L127
[2] http://docs.openstack.org/developer/ceilometer/events.html

Yes,here I am referring  to Events[2].

My requirement is to get sample/counter with "instance" name ,with event_type compute.instance.*

For example:

{u'counter_name': u'instance', u'user_id': u'0eddb9bb412b4b2783fbdb04c7786fbd', u'message_signature': u'a575aee7540c8aac5d481fbeb6c96e8a967814c7f7d712b3b3da0a4ebccabb1d', u'timestamp': u'2016-11-01 07:34:42.994144', u'resource_id': u'1784a230-5038-46e9-9a2e-f96dabc1ea26', u'message_id': u'a7bac522-a005-11e6-abbb-52540074f46a', u'source': u'openstack', u'counter_unit': u'instance', u'counter_volume': 1, u'project_id': u'33dbef1a1442476b9c5935287df86f2c', u'resource_metadata': {u'state_description': u'', u'event_type': u'compute.instance.delete.end', u'availability_zone': u'nova', u'terminated_at': u'2016-11-01T07:34:42.167439', u'ephemeral_gb': 0, u'instance_type_id': 5, u'deleted_at': u'2016-11-01T07:34:42.000000', u'reservation_id': u'r-bhq970mr', u'memory_mb': 2048, u'display_name': u'mysite_exampleservice-1', u'hostname': u'mysite-exampleservice-1', u'state': u'deleted', u'progress': u'', u'launched_at': u'2016-10-31T21:54:53.000000', u'node': u'chilly-police.cord.lab', u'ramdisk_id': u'', u'access_ip_v6': None, u'disk_gb': 20, u'access_ip_v4': None, u'kernel_id': u'', u'host': u'compute.chilly-police', u'user_id': u'0eddb9bb412b4b2783fbdb04c7786fbd', u'image_ref_url': u'http://10.1.0.18:9292/images/8f2185b2-1669-46df-8a01-88b3abd88aa5', u'cell_name': u'', u'root_gb': 20, u'tenant_id': u'33dbef1a1442476b9c5935287df86f2c', u'created_at': u'2016-10-31 21:54:32+00:00', u'instance_id': u'1784a230-5038-46e9-9a2e-f96dabc1ea26', u'instance_type': u'm1.small', u'vcpus': 1, u'image_meta': {u'min_disk': u'20', u'container_format': u'bare', u'min_ram': u'0', u'disk_format': u'raw', u'base_image_ref': u'8f2185b2-1669-46df-8a01-88b3abd88aa5'}, u'architecture': None, u'os_type': None, u'instance_flavor_id': u'2'}, u'counter_type': u'gauge'}'

Now I am able to do this by  creating event_definitions.yaml ,event_pipeline.yaml as mentioned bt Ganpat and updating conf files:

1,ceilometer.conf:
   notification_topics = notifications
   [notification]
   store_events = True
   [event]
   drop_unmatched_notifications = False
   definitions_cfg_file = /etc/ceilometer/event_definitions.yaml

With Best Regards
 Raghunath Dudyala
 Tata Consultancy Services Limited
 Mailto: raghunath.d at tcs.com
 Website: http://www.tcs.com
 ____________________________________________
 Experience certainty.	IT Services
 			Business Solutions
 			Consulting
 ____________________________________________
 

-----gordon chung <gord at live.ca> wrote: -----
To: "openstack-dev at lists.openstack.org" <openstack-dev at lists.openstack.org>
From: gordon chung <gord at live.ca>
Date: 10/31/2016 09:54PM
Subject: Re: [openstack-dev] [Ceilometer]: Instance creation and deletion metrics in ceilometer !

what meters are you looking for specifically? as Ganpat mentioned, we 
only derive a few meters from Nova notifications[1]. i don't understand 
your comment about being able to see events on kafka. by 'events' do you 
mean Ceilometer Events[2]?

[1] 
https://github.com/openstack/ceilometer/blob/master/ceilometer/meter/data/meters.yaml#L83-L127
[2] http://docs.openstack.org/developer/ceilometer/events.html



On 31/10/16 04:27 AM, Raghunath D wrote:
> Hi Ganpat,
>
> I want the samples related with these events.
>
> With Best Regards
> Raghunath Dudyala
> Tata Consultancy Services Limited
> Mailto: raghunath.d at tcs.com
> Website: http://www.tcs.com
> ____________________________________________
> Experience certainty. IT Services
> Business Solutions
> Consulting
> ____________________________________________
>
>
> -----Ganpat Agarwal <gans.developer at gmail.com> wrote: -----
> To: "OpenStack Development Mailing List (not for usage questions)"
> <openstack-dev at lists.openstack.org>
> From: Ganpat Agarwal <gans.developer at gmail.com>
> Date: 10/27/2016 12:02PM
> Subject: Re: [openstack-dev] [Ceilometer]: Instance creation and
> deletion metrics in ceilometer !
>
> Hi Raghunath,
>
> I am not able to understand your use case for compute.instance.* events.
>
> You are trying to catch the instance start and end events OR you want
> the samples related with these events?
>
> Regards,
> Ganpat
>
> On Wed, Oct 26, 2016 at 6:00 PM, Raghunath D <raghunath.d at tcs.com
> <mailto:raghunath.d at tcs.com>> wrote:
>
>     Hi Ganpat/Gord,
>
>     Callback for compute.instance.create.end events under
>     ceilometer.compute.notifications should be invoked for those
>     notification events on the nova exchange using the
>     notifications.info <http://notifications.info> topic.
>     But this is not happening,we can see events related to them and can
>     receive events over kafka.
>
>     I can see from logs which print my debug print during the loading of
>     notification plugin.
>     "2016-10-26 03:46:32.010 34977 INFO
>     ceilometer.compute.notifications.instance
>     [req-1ad3d5c9-5eab-404d-9fbe-f1605e93691f - - - - -] Check
>     ComputeInstanceNotificationBase notification:"
>
>   ÿ Do we need to change any thing in the configuration file of
> ÿ ÿ ceilometer or nova to achive this.
> ÿ ÿ It would be great help for me if this is fixed.
>
> ÿ ÿ With Best Regards
> ÿ ÿ Raghunath Dudyala
> ÿ ÿ Tata Consultancy Services Limited
> ÿ ÿ Mailto: raghunath.d at tcs.com <mailto:raghunath.d at tcs.com>
> ÿ ÿ Website: http://www.tcs.com
> ÿ ÿ ____________________________________________
> ÿ ÿ Experience certainty. IT Services
> ÿ ÿ Business Solutions
> ÿ ÿ Consulting
> ÿ ÿ ____________________________________________
>
>
> ÿ ÿ -----Ganpat Agarwal <gans.developer at gmail.com
> ÿ ÿ <mailto:gans.developer at gmail.com>> wrote: -----
> ÿ ÿ To: "OpenStack Development Mailing List (not for usage questions)"
> ÿ ÿ <openstack-dev at lists.openstack.org
> ÿ ÿ <mailto:openstack-dev at lists.openstack.org>>
> ÿ ÿ From: Ganpat Agarwal <gans.developer at gmail.com
> ÿ ÿ <mailto:gans.developer at gmail.com>>
> ÿ ÿ Date: 10/25/2016 09:32PM
>
> ÿ ÿ Subject: Re: [openstack-dev] [Ceilometer]: Instance creation and
> ÿ ÿ deletion metrics in ceilometer !
>
> ÿ ÿ Hi Raghunath,
>
> ÿ ÿ You can look at this file for details of meters related with
> ÿ ÿ compute.instance.*
>
> ÿ ÿ ceilometer/meter/data/meters.yaml
>
> ÿ ÿ Additionally, you can look at this link for compute meters documentation
>
> ÿ ÿ http://docs.openstack.org/admin-guide/telemetry-measurements.html
> ÿ ÿ <http://docs.openstack.org/admin-guide/telemetry-measurements.html>
>
>
> ÿ ÿ Also, have a look at "Meters definitions" section on this link
>
> ÿ ÿ http://docs.openstack.org/admin-guide/telemetry-data-collection.html#meter-definitions
> ÿ ÿ <http://docs.openstack.org/admin-guide/telemetry-data-collection.html#meter-definitions>
>
> ÿ ÿ Regards,
> ÿ ÿ Ganpat
>
>
> ÿ ÿ On Tue, Oct 25, 2016 at 5:45 PM, Raghunath D <raghunath.d at tcs.com
> ÿ ÿ <mailto:raghunath.d at tcs.com>> wrote:
>
> ÿ ÿ ÿ ÿ Hi Ganpat,
>
> ÿ ÿ ÿ ÿ ÿAre you able to see merers/samples related to
> ÿ ÿ ÿ ÿ compute.instance.* in ceilometer meter-list or ceilometer
> ÿ ÿ ÿ ÿ sample-list.
> ÿ ÿ ÿ ÿ My application which will read info from ceilometer publisher
> ÿ ÿ ÿ ÿ (pipeline.yaml) and I am looking for meters realted to
> ÿ ÿ ÿ ÿ ceilometer.instance.*
>
> ÿ ÿ ÿ ÿ With Best Regards
> ÿ ÿ ÿ ÿ Raghunath Dudyala
> ÿ ÿ ÿ ÿ Tata Consultancy Services Limited
> ÿ ÿ ÿ ÿ Mailto: raghunath.d at tcs.com <mailto:raghunath.d at tcs.com>
> ÿ ÿ ÿ ÿ Website: http://www.tcs.com
> ÿ ÿ ÿ ÿ ____________________________________________
> ÿ ÿ ÿ ÿ Experience certainty. IT Services
> ÿ ÿ ÿ ÿ Business Solutions
> ÿ ÿ ÿ ÿ Consulting
> ÿ ÿ ÿ ÿ ____________________________________________
>
>
> ÿ ÿ ÿ ÿ -----Ganpat Agarwal <gans.developer at gmail.com
> ÿ ÿ ÿ ÿ <mailto:gans.developer at gmail.com>> wrote: -----
> ÿ ÿ ÿ ÿ To: "OpenStack Development Mailing List (not for usage
> ÿ ÿ ÿ ÿ questions)" <openstack-dev at lists.openstack.org
> ÿ ÿ ÿ ÿ <mailto:openstack-dev at lists.openstack.org>>
> ÿ ÿ ÿ ÿ From: Ganpat Agarwal <gans.developer at gmail.com
> ÿ ÿ ÿ ÿ <mailto:gans.developer at gmail.com>>
> ÿ ÿ ÿ ÿ Date: 10/25/2016 05:05PM
> ÿ ÿ ÿ ÿ Subject: Re: [openstack-dev] [Ceilometer]: Instance creation and
> ÿ ÿ ÿ ÿ deletion metrics in ceilometer !
>
>
> ÿ ÿ ÿ ÿ Hi,
>
> ÿ ÿ ÿ ÿ I am able to get event notifications on kafka by applying these
> ÿ ÿ ÿ ÿ configurations:
>
> ÿ ÿ ÿ ÿ nova.conf
>
> ÿ ÿ ÿ ÿ instance_usage_audit = True
>
> ÿ ÿ ÿ ÿ instance_usage_audit_period = hour
>
> ÿ ÿ ÿ ÿ notify_on_state_change = vm_and_task_state
>
> ÿ ÿ ÿ ÿ notification_driver = messagingv2
>
>
> ÿ ÿ ÿ ÿ Restart nova compute service
>
> ÿ ÿ ÿ ÿ ceilometer.conf
>
> ÿ ÿ ÿ ÿ [event]
>
> ÿ ÿ ÿ ÿ drop_unmatched_notifications = False
>
> ÿ ÿ ÿ ÿ definitions_cfg_file = /etc/ceilometer/event_definitions.yaml
>
>
> ÿ ÿ ÿ ÿ event_pipeline.yaml
>
> ÿ ÿ ÿ ÿ ---
>
> ÿ ÿ ÿ ÿ sources:
>
> ÿ ÿ ÿ ÿ ÿ ÿ - name: event_source
>
> ÿ ÿ ÿ ÿ ÿ ÿ ÿ events:
>
> ÿ ÿ ÿ ÿ ÿ ÿ ÿ ÿ ÿ- compute.instance.*
>
> ÿ ÿ ÿ ÿ ÿ ÿ ÿ sinks:
>
> ÿ ÿ ÿ ÿ ÿ ÿ ÿ ÿ ÿ - event_sink
>
> ÿ ÿ ÿ ÿ sinks:
>
> ÿ ÿ ÿ ÿ ÿ ÿ - name: event_sink
>
> ÿ ÿ ÿ ÿ ÿ ÿ ÿ transformers:
>
> ÿ ÿ ÿ ÿ ÿ ÿ ÿ triggers:
>
> ÿ ÿ ÿ ÿ ÿ ÿ ÿ publishers:
>
> ÿ ÿ ÿ ÿ ÿ ÿ ÿ ÿ ÿ #- notifier://
>
> ÿ ÿ ÿ ÿ ÿ ÿ ÿ ÿ ÿ #-
> ÿ ÿ ÿ ÿ file:///home/stack/test?max_bytes=10000000&backup_count=5
>
> ÿ ÿ ÿ ÿ ÿ ÿ ÿ ÿ ÿ - kafka://kafka-broker:9092?topic=ceilometer
>
>
> ÿ ÿ ÿ ÿ service ceilometer-api restart
>
> ÿ ÿ ÿ ÿ service ceilometer-agent-notification restart
>
>
> ÿ ÿ ÿ ÿ Wait for couple of minutes and you should be getting the events
> ÿ ÿ ÿ ÿ on your kafka consumer and in ceilometer notifications logs as well
>
> ÿ ÿ ÿ ÿ tail -f /var/log/ceilometer/ceilometer-agent-notification.log
>
>
> ÿ ÿ ÿ ÿ Let me know if it helps.
>
>
> ÿ ÿ ÿ ÿ Regards,
>
> ÿ ÿ ÿ ÿ Ganpat
>
>
>
> ÿ ÿ ÿ ÿ On Tue, Oct 25, 2016 at 3:02 PM, Raghunath D
> ÿ ÿ ÿ ÿ <raghunath.d at tcs.com <mailto:raghunath.d at tcs.com>> wrote:
>
> ÿ ÿ ÿ ÿ ÿ ÿ Hi ,
>
> ÿ ÿ ÿ ÿ ÿ ÿ Can some one please suggest how to instance notifications in
> ÿ ÿ ÿ ÿ ÿ ÿ ceilometer.
>
> ÿ ÿ ÿ ÿ ÿ ÿ With Best Regards
> ÿ ÿ ÿ ÿ ÿ ÿ Raghunath Dudyala
> ÿ ÿ ÿ ÿ ÿ ÿ Tata Consultancy Services Limited
> ÿ ÿ ÿ ÿ ÿ ÿ Mailto: raghunath.d at tcs.com <mailto:raghunath.d at tcs.com>
> ÿ ÿ ÿ ÿ ÿ ÿ Website: http://www.tcs.com
> ÿ ÿ ÿ ÿ ÿ ÿ ____________________________________________
> ÿ ÿ ÿ ÿ ÿ ÿ Experience certainty. IT Services
> ÿ ÿ ÿ ÿ ÿ ÿ Business Solutions
> ÿ ÿ ÿ ÿ ÿ ÿ Consulting
> ÿ ÿ ÿ ÿ ÿ ÿ ____________________________________________
>
>
> ÿ ÿ ÿ ÿ ÿ ÿ -----Raghunath D/HYD/TCS wrote: -----
> ÿ ÿ ÿ ÿ ÿ ÿ To: openstack-dev at lists.openstack.org
> ÿ ÿ ÿ ÿ ÿ ÿ <mailto:openstack-dev at lists.openstack.org>
> ÿ ÿ ÿ ÿ ÿ ÿ From: Raghunath D/HYD/TCS
> ÿ ÿ ÿ ÿ ÿ ÿ Date: 10/18/2016 08:01PM
> ÿ ÿ ÿ ÿ ÿ ÿ Subject: [openstack-dev] [Ceilometer]: Instance creation and
> ÿ ÿ ÿ ÿ ÿ ÿ deletion metrics in ceilometer !
>
>
> ÿ ÿ ÿ ÿ ÿ ÿ Hi ,
>
> ÿ ÿ ÿ ÿ ÿ ÿ How can instance created and deleted information/sample can
> ÿ ÿ ÿ ÿ ÿ ÿ be retrieved from ceilometer.
> ÿ ÿ ÿ ÿ ÿ ÿ What entries should be there in pipeline.yaml ÿto get
> ÿ ÿ ÿ ÿ ÿ ÿ instance deleted information.
>
> ÿ ÿ ÿ ÿ ÿ ÿ I tried to have meters- "instance" in pipeline.yam but it
> ÿ ÿ ÿ ÿ ÿ ÿ always gives active instance details,
> ÿ ÿ ÿ ÿ ÿ ÿ and no details of deleted instances.
>
> ÿ ÿ ÿ ÿ ÿ ÿ With Best Regards
> ÿ ÿ ÿ ÿ ÿ ÿ Raghunath Dudyala
> ÿ ÿ ÿ ÿ ÿ ÿ Tata Consultancy Services Limited
> ÿ ÿ ÿ ÿ ÿ ÿ Mailto: raghunath.d at tcs.com <mailto:raghunath.d at tcs.com>
> ÿ ÿ ÿ ÿ ÿ ÿ Website: http://www.tcs.com
> ÿ ÿ ÿ ÿ ÿ ÿ ____________________________________________
> ÿ ÿ ÿ ÿ ÿ ÿ Experience certainty. IT Services
> ÿ ÿ ÿ ÿ ÿ ÿ Business Solutions
> ÿ ÿ ÿ ÿ ÿ ÿ Consulting
> ÿ ÿ ÿ ÿ ÿ ÿ ____________________________________________
>
> ÿ ÿ ÿ ÿ ÿ ÿ =====-----=====-----=====
> ÿ ÿ ÿ ÿ ÿ ÿ Notice: The information contained in this e-mail
> ÿ ÿ ÿ ÿ ÿ ÿ message and/or attachments to it may contain
> ÿ ÿ ÿ ÿ ÿ ÿ confidential or privileged information. If you are
> ÿ ÿ ÿ ÿ ÿ ÿ not the intended recipient, any dissemination, use,
> ÿ ÿ ÿ ÿ ÿ ÿ review, distribution, printing or copying of the
> ÿ ÿ ÿ ÿ ÿ ÿ information contained in this e-mail message
> ÿ ÿ ÿ ÿ ÿ ÿ and/or attachments to it are strictly prohibited. If
> ÿ ÿ ÿ ÿ ÿ ÿ you have received this communication in error,
> ÿ ÿ ÿ ÿ ÿ ÿ please notify us by reply e-mail or telephone and
> ÿ ÿ ÿ ÿ ÿ ÿ immediately and permanently delete the message
> ÿ ÿ ÿ ÿ ÿ ÿ and any attachments. Thank you
>
>
> ÿ ÿ ÿ ÿ ÿ ÿ __________________________________________________________________________
> ÿ ÿ ÿ ÿ ÿ ÿ OpenStack Development Mailing List (not for usage questions)
> ÿ ÿ ÿ ÿ ÿ ÿ Unsubscribe:
> ÿ ÿ ÿ ÿ ÿ ÿ OpenStack-dev-request at lists.openstack.org?subject:unsubscribe <http://OpenStack-dev-request@lists.openstack.org?subject:unsubscribe>
> ÿ ÿ ÿ ÿ ÿ ÿ http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
> ÿ ÿ ÿ ÿ ÿ ÿ <http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev>
>
>
> ÿ ÿ ÿ ÿ __________________________________________________________________________
> ÿ ÿ ÿ ÿ OpenStack Development Mailing List (not for usage questions)
> ÿ ÿ ÿ ÿ Unsubscribe:
> ÿ ÿ ÿ ÿ OpenStack-dev-request at lists.openstack.org?subject:unsubscribe
> ÿ ÿ ÿ ÿ <http://OpenStack-dev-request@lists.openstack.org?subject:unsubscribe>
> ÿ ÿ ÿ ÿ http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-devÿ<http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev>
>
> ÿ ÿ ÿ ÿ __________________________________________________________________________
> ÿ ÿ ÿ ÿ OpenStack Development Mailing List (not for usage questions)
> ÿ ÿ ÿ ÿ Unsubscribe:
> ÿ ÿ ÿ ÿ OpenStack-dev-request at lists.openstack.org?subject:unsubscribe
> ÿ ÿ ÿ ÿ <http://OpenStack-dev-request@lists.openstack.org?subject:unsubscribe>
> ÿ ÿ ÿ ÿ http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-devÿ<http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev>
>
>
> ÿ ÿ __________________________________________________________________________
> ÿ ÿ OpenStack Development Mailing List (not for usage questions)
> ÿ ÿ Unsubscribe:
> ÿ ÿ OpenStack-dev-request at lists.openstack.org?subject:unsubscribe
> ÿ ÿ <http://OpenStack-dev-request@lists.openstack.org?subject:unsubscribe>
> ÿ ÿ http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
> ÿ ÿ <http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev>
>
> ÿ ÿ __________________________________________________________________________
> ÿ ÿ OpenStack Development Mailing List (not for usage questions)
> ÿ ÿ Unsubscribe:
> ÿ ÿ OpenStack-dev-request at lists.openstack.org?subject:unsubscribe
> ÿ ÿ <http://OpenStack-dev-request@lists.openstack.org?subject:unsubscribe>
> ÿ ÿ http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
> ÿ ÿ <http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev>
>
>
> __________________________________________________________________________
> OpenStack Development Mailing List (not for usage questions)
> Unsubscribe: OpenStack-dev-request at lists.openstack.org?subject:unsubscribe
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
>
>
> __________________________________________________________________________
> OpenStack Development Mailing List (not for usage questions)
> Unsubscribe: OpenStack-dev-request at lists.openstack.org?subject:unsubscribe
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
>

-- 
gord

__________________________________________________________________________
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: OpenStack-dev-request at lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-dev/attachments/20161101/c7205383/attachment.html>


More information about the OpenStack-dev mailing list