Merge "Add user_id,project_id traits to audit events"

This commit is contained in:
Jenkins 2015-09-03 18:10:19 +00:00 committed by Gerrit Code Review
commit 5ffa165a11
3 changed files with 12 additions and 0 deletions
ceilometer/event
doc/source
etc/ceilometer

@ -154,6 +154,12 @@ class EventDefinition(object):
DEFAULT_TRAITS = dict(
service=dict(type='text', fields='publisher_id'),
request_id=dict(type='text', fields='_context_request_id'),
project_id=dict(type='text', fields=['payload.tenant_id',
'_context_tenant']),
user_id=dict(type='text', fields=['payload.user_id',
'_context_user_id']),
# TODO(dikonoor):tenant_id is old terminology and should
# be deprecated
tenant_id=dict(type='text', fields=['payload.tenant_id',
'_context_tenant']),
)

@ -126,6 +126,8 @@ all events if the notification has the relevant data:
* service: (All notifications should have this) notification's publisher
* tenant_id
* request_id
* project_id
* user_id
These do not have to be specified in the event definition, they are
automatically added, but their definitions can be overridden for a given

@ -331,6 +331,10 @@
fields: ['payload.ipsec_site_connection.id', 'payload.id']
- event_type: '*http.*'
traits: &http_audit
project_id:
fields: payload.initiator.project_id
user_id:
fields: payload.initiator.id
typeURI:
fields: payload.typeURI
eventType: