pollster/api sample notifications should have dictionary payload

Bug #1484937 reported by gordon chung
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ceilometer
Fix Released
Undecided
gordon chung

Bug Description

the rough format of api/pollsters notificatoins is as follows:

NOTIFICATION = {
    u'_context_domain': None,
    u'_context_request_id': u'req-da91b4bf-d2b5-43ae-8b66-c7752e72726d',
    'event_type': u'sample.create',
    'timestamp': u'2015-06-1909: 19: 35.786893',
    u'_context_auth_token': None,
    u'_context_read_only': False,
    'payload': [{
                u'counter_name': u'instance100',
                u'user_id': u'e1d870e51c7340cb9d555b15cbfcaec2',
                u'resource_id': u'instance',
                u'timestamp': u'2015-06-19T09: 19: 35.785330',
                u'message_signature': u'fake_signature1',
                u'resource_metadata': {u'foo': u'bar'},
                u'source': u'30be1fc9a03c4e94ab05c403a8a377f2: openstack',
                u'counter_unit': u'instance',
                u'counter_volume': 1.0,
                u'project_id': u'30be1fc9a03c4e94ab05c403a8a377f2',
                u'message_id': u'4d865c6e-1664-11e5-9d41-0819a6cff905',
                u'counter_type': u'gauge'
                },
                {
                u'counter_name': u'instance100',
                u'user_id': u'e1d870e51c7340cb9d555b15cbfcaec2',
                u'resource_id': u'instance',
                u'timestamp': u'2015-06-19T09: 19: 35.785330',
                u'message_signature': u'fake_signature12',
                u'resource_metadata': {u'foo': u'bar'},
                u'source': u'30be1fc9a03c4e94ab05c403a8a377f2: openstack',
                u'counter_unit': u'instance',
                u'counter_volume': 1.0,
                u'project_id': u'30be1fc9a03c4e94ab05c403a8a377f2',
                u'message_id': u'4d866da8-1664-11e5-9d41-0819a6cff905',
                u'counter_type': u'gauge'
                }],
    u'_context_resource_uuid': None,
    u'_context_user_identity': u'fake_user_identity---',
    u'_context_show_deleted': False,
    u'_context_tenant': u'30be1fc9a03c4e94ab05c403a8a377f2',
    'priority': 'info',
    u'_context_is_admin': True,
    u'_context_project_domain': None,
    u'_context_user': u'e1d870e51c7340cb9d555b15cbfcaec2',
    u'_context_user_domain': None,
    'publisher_id': u'ceilometer.api',
    'message_id': u'939823de-c242-45a2-a399-083f4d6a8c3e'
}

since payload is a list, it does not make it very extensible. for us to send anything else, we need to create an entire different event.

Revision history for this message
gordon chung (chungg) wrote :

another reason is that by default, metadata is the taken as full payload... and it's expected to be dict. we can change that behaviour but i think it should probably change here too.

Revision history for this message
Chris Dent (cdent) wrote :

I'm confused, what, besides a list of samples, do you want to send?

Revision history for this message
gordon chung (chungg) wrote :

poll interval, polling targets, etc... just metadata on how the data was generated.

it would actually help with this: https://blueprints.launchpad.net/ceilometer/+spec/record-sample-periodicity

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to ceilometer (master)

Fix proposed to branch: master
Review: https://review.openstack.org/213851

Changed in ceilometer:
assignee: nobody → gordon chung (chungg)
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to ceilometer (master)

Reviewed: https://review.openstack.org/213851
Committed: https://git.openstack.org/cgit/openstack/ceilometer/commit/?id=988a573f7fc1932aa4647c99dec1d33a93a44688
Submitter: Jenkins
Branch: master

commit 988a573f7fc1932aa4647c99dec1d33a93a44688
Author: gordon chung <email address hidden>
Date: Mon Aug 17 16:20:49 2015 -0400

    make telemetry sample payloads dictionaries

    this patch makes the payload we generate via polling agents and
    api a dictionary. this gives us more flexibility to include metadata
    on how the data was generated that we don't necessary want to
    include in sample metadata.

    Change-Id: I1350c78c52fad8111241b3f77698fef6c4aa77a9
    Closes-Bug: #1484937

Changed in ceilometer:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in ceilometer:
milestone: none → liberty-3
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in ceilometer:
milestone: liberty-3 → 5.0.0
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.