[openstack-dev] [ceilometer]Looking for endpoint where event passed after first time
Hi folks, I am posting some self-defined events to amqp ceilometer exchange notification topic, during the debug session, I find that at the first time, event are arriving at notification bus as the AMQPIncomingMessage, and then handled by EventsNotificationEndpoint() , however, the second time, neither the AMQPIncomingMessage or the EventsNotificationEndpoint can see it, but it does can list from ceilometer event-list. So I wonder how is the event processing with the same event type? Thanks in advance! BR. Hui. __ OpenStack Development Mailing List (not for usage questions) Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
Re: [openstack-dev] [ceilometer]Looking for endpoint where event passed after first time
On 19/04/17 03:05 PM, Hui Xiang wrote: > Hi folks, > > I am posting some self-defined events to amqp ceilometer exchange > notification topic, during the debug session, I find that at the first > time, event are arriving at notification bus as the AMQPIncomingMessage, > and then handled by EventsNotificationEndpoint() , however, the second > time, neither the AMQPIncomingMessage or the EventsNotificationEndpoint > can see it, but it does can list from ceilometer event-list. So I wonder > how is the event processing with the same event type? > not sure what version you are using, but basic workflow since mitaka (i think) is the notification agent listens to 'notifications.*' topics on specific exchanges (including) ceilometer. for events, it attempts to match incoming message against known events[1]. it will build event based on definition. if there is no, definition, it will create a sparse event with a few attributes. from there it is processed according to pipeline[2]. you'll noticed by default it pushes to gnocchi so it won't get stored in ceilometer/panko storage. you can edit it accordingly. [1] https://github.com/openstack/ceilometer/blob/master/ceilometer/pipeline/data/event_definitions.yaml [2] https://github.com/openstack/ceilometer/blob/master/ceilometer/pipeline/data/event_pipeline.yaml cheers, -- gord __ OpenStack Development Mailing List (not for usage questions) Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
Re: [openstack-dev] [ceilometer]Looking for endpoint where event passed after first time
Thanks gordon. I am using Mitaka version. And yes I have known that ceilometer notification agent will listen for the notification topics, but my question is which file/class will do it. When I am debugging the code, at the first time when the event send out to ceilometer exchange notification topic, EventsNotificationEndpoint in event/endpoint.py will handle it, however, when I send the same event again, with log/pdb enabled, the event is not processed in EventsNotificationEndpoint any more, and I can't find where it is done. It looks so weird or maybe that is by design for some reason? The behavior is same with/without definition in event_definition.yaml So I wonder how is different for the workflow by sending same events twice. Thanks. On Thu, Apr 20, 2017 at 6:11 AM, gordon chung wrote: > > > On 19/04/17 03:05 PM, Hui Xiang wrote: > > Hi folks, > > > > I am posting some self-defined events to amqp ceilometer exchange > > notification topic, during the debug session, I find that at the first > > time, event are arriving at notification bus as the AMQPIncomingMessage, > > and then handled by EventsNotificationEndpoint() , however, the second > > time, neither the AMQPIncomingMessage or the EventsNotificationEndpoint > > can see it, but it does can list from ceilometer event-list. So I wonder > > how is the event processing with the same event type? > > > > not sure what version you are using, but basic workflow since mitaka (i > think) is the notification agent listens to 'notifications.*' topics on > specific exchanges (including) ceilometer. for events, it attempts to > match incoming message against known events[1]. it will build event > based on definition. if there is no, definition, it will create a sparse > event with a few attributes. from there it is processed according to > pipeline[2]. you'll noticed by default it pushes to gnocchi so it won't > get stored in ceilometer/panko storage. you can edit it accordingly. > > [1] > https://github.com/openstack/ceilometer/blob/master/ > ceilometer/pipeline/data/event_definitions.yaml > [2] > https://github.com/openstack/ceilometer/blob/master/ > ceilometer/pipeline/data/event_pipeline.yaml > > cheers, > -- > gord > __ > OpenStack Development Mailing List (not for usage questions) > Unsubscribe: openstack-dev-requ...@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-requ...@lists.openstack.org?subject:unsubscribe http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
Re: [openstack-dev] [ceilometer]Looking for endpoint where event passed after first time
On 20/04/17 01:46 AM, Hui Xiang wrote: > And yes I have known that ceilometer notification agent will listen for > the notification topics, but my question is which file/class will do it. > When I am debugging the code, at the first time when the event send out > to ceilometer exchange notification topic, EventsNotificationEndpoint > in event/endpoint.py will handle it, however, when I send the same > event again, with log/pdb enabled, the event is not processed in > EventsNotificationEndpoint any more, and I can't find where it is done. > It looks so weird or maybe that is by design for some reason? The > behavior is same with/without definition in event_definition.yaml this listener[1] is loading EventsNotificationEndpoint. if you look at EventsNotificationEndpoint, you can see it picks up stuff on .info and .error topics and normalises them to Event obj. i'm assuming you're using oslo.messaging to push to queue as well. i don't think the system works if you are pushing your own format to queue. > > So I wonder how is different for the workflow by sending same events twice. there is no difference. only difference is a different agent might be handling it (if you have multiple notification agents) [1] https://github.com/openstack/ceilometer/blob/stable/mitaka/ceilometer/notification.py#L242-L245 -- gord __ OpenStack Development Mailing List (not for usage questions) Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
Re: [openstack-dev] [ceilometer]Looking for endpoint where event passed after first time
Thanks gordon!! that explains why I can't trace the event since I have multi notification agents. On Thu, Apr 20, 2017 at 8:48 PM, gordon chung wrote: > > > On 20/04/17 01:46 AM, Hui Xiang wrote: > > And yes I have known that ceilometer notification agent will listen for > > the notification topics, but my question is which file/class will do it. > > When I am debugging the code, at the first time when the event send out > > to ceilometer exchange notification topic, EventsNotificationEndpoint > > in event/endpoint.py will handle it, however, when I send the same > > event again, with log/pdb enabled, the event is not processed in > > EventsNotificationEndpoint any more, and I can't find where it is done. > > It looks so weird or maybe that is by design for some reason? The > > behavior is same with/without definition in event_definition.yaml > > this listener[1] is loading EventsNotificationEndpoint. if you look at > EventsNotificationEndpoint, you can see it picks up stuff on .info and > .error topics and normalises them to Event obj. > > i'm assuming you're using oslo.messaging to push to queue as well. i > don't think the system works if you are pushing your own format to queue. > > > > > > So I wonder how is different for the workflow by sending same events > twice. > > there is no difference. only difference is a different agent might be > handling it (if you have multiple notification agents) > > [1] > https://github.com/openstack/ceilometer/blob/stable/mitaka/ > ceilometer/notification.py#L242-L245 > > -- > gord > __ > OpenStack Development Mailing List (not for usage questions) > Unsubscribe: openstack-dev-requ...@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-requ...@lists.openstack.org?subject:unsubscribe http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev