diff --git a/build.sh b/build.sh index 7625ae7..e9c2a55 100755 --- a/build.sh +++ b/build.sh @@ -34,6 +34,7 @@ pip install librabbitmq for file in $SOURCE_DIR/* do cd $file + rm -rf build dist python setup.py install cd ../.. done diff --git a/distiller.conf b/distiller.conf new file mode 100644 index 0000000..6bfd3f7 --- /dev/null +++ b/distiller.conf @@ -0,0 +1,36 @@ +--- +- event_type: compute.* + traits: &instance_traits + tenant_id: + fields: payload.tenant_id + user_id: + fields: payload.user_id + instance_id: + fields: payload.instance_id + host: + fields: publisher_id + plugin: + name: split + parameters: + segment: 1 + max_split: 1 + service: + fields: publisher_id + plugin: split + state: + fields: payload.state + launched_at: + type: datetime + fields: payload.launched_at + deleted_at: + type: datetime + fields: payload.deleted_at +- event_type: compute.instance.exists + traits: + <<: *instance_traits + audit_period_beginning: + type: datetime + fields: payload.audit_period_beginning + audit_period_ending: + type: datetime + fields: payload.audit_period_ending diff --git a/shoebox.conf b/shoebox.conf index 694eb0c..bab1528 100644 --- a/shoebox.conf +++ b/shoebox.conf @@ -44,3 +44,5 @@ filename_template=events_%Y_%m_%d_%X_%f.dat roll_checker=shoebox.roll_checker:SizeRollChecker roll_size_mb=1 callback=shoebox.handlers:MoveFileCallback + +distiller_conf=../../../distiller.conf