Skip to content

Instantly share code, notes, and snippets.

@dhellmann
Created May 31, 2012 16:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dhellmann/2844410 to your computer and use it in GitHub Desktop.
Save dhellmann/2844410 to your computer and use it in GitHub Desktop.
ceilometer meter message format, v 0.1
msg = {
'method': 'record_metering_data',
'version': '1.0',
'args': {'data': {
'source': counter.source,
'counter_type': counter.type,
'counter_volume': counter.volume,
'user_id': counter.user_id,
'project_id': counter.project_id,
'resource_id': counter.resource_id,
'timestamp': counter.timestamp,
'counter_duration': counter.duration,
'resource_metadata': counter.resource_metadata,
'message_id': str(uuid.uuid1()),
# This field is used by the notification system.
'event_type': '%s.%s' % (cfg.CONF.metering_topic,
counter.type),
'message_signature': '', # hmac value
},
},
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment