the data captured by ceilometer maps to json pretty cleanly. it'd be nice to have file dispatcher write in a way that can easily be changed to json so that it can be read in by a processing tool such as spark for efficient post processing.
currently, the file dispatcher writes metering data as a list:
[{u'counter_name': u'vcpus', u'user_id': u'd510479b90ab4c9b9d6069bb2c42998d', u'message_signature': u'b867f6b0994171393ff9eddfb037cdedc381694191c273282f3ec75083af3c30', u'timestamp': u'2015-03-27 22:00:49.204839', u'resource_id': u'30474703-7afb-4045-8626-5e7ce97bfa18', u'message_id': u'ba543da4-d4cc-11e4-927b-28b2bd01ed52', u'source': u'openstack', u'counter_unit': u'vcpu', u'counter_volume': 1, u'project_id': u'fb1b20664781417d8270ffc4d9b0df03', u'resource_metadata': {u'state_description': u'', u'event_type': u'compute.instance.exists', u'availability_zone': u'nova', u'terminated_at': u'', u'ephemeral_gb': 0, u'instance_type_id': 6, u'bandwidth': {}, u'deleted_at': u'', u'reservation_id': u'r-j3y63nnp', u'instance_id': u'30474703-7afb-4045-8626-5e7ce97bfa18', u'display_name': u'inst', u'hostname': u'inst', u'state': u'active', u'progress': u'', u'launched_at': u'2015-03-27T13:11:48.000000', u'node': u'reverie', u'ramdisk_id': u'8cc6bcc9-dce1-4187-bca5-d4179edff630', u'access_ip_v6': None, u'disk_gb': 0, u'access_ip_v4': None, u'kernel_id': u'2555347b-91a4-4f8b-afb6-091cd8a7572e', u'host': u'compute.reverie', u'user_id': u'd510479b90ab4c9b9d6069bb2c42998d', u'image_ref_url': u'http://10.162.32.175:9292/images/283de560-a2e1-4e9d-b7fd-6b08f5008460', u'cell_name': u'', u'audit_period_beginning': u'2015-03-27 21:00:00', u'root_gb': 0, u'tenant_id': u'fb1b20664781417d8270ffc4d9b0df03', u'created_at': u'2015-03-27 13:11:41+00:00', u'memory_mb': 64, u'instance_type': u'm1.nano', u'vcpus': 1, u'image_meta': {u'kernel_id': u'2555347b-91a4-4f8b-afb6-091cd8a7572e', u'container_format': u'ami', u'min_ram': u'0', u'ramdisk_id': u'8cc6bcc9-dce1-4187-bca5-d4179edff630', u'disk_format': u'ami', u'min_disk': u'0', u'base_image_ref': u'283de560-a2e1-4e9d-b7fd-6b08f5008460'}, u'architecture': None, u'audit_period_ending': u'2015-03-27 22:00:00', u'os_type': None, u'instance_flavor_id': u'42'}, u'counter_type': u'gauge'}]
and events as a object
[<Event: a950f983-b771-4080-bc86-8d7b14851e95, compute.instance.exists, 2015-03-27 22:00:49.223657, <Trait: state 1 active> <Trait: audit_period_beginning 4 2015-03-27 21:00:00> <Trait: root_gb 2 0> <Trait: user_id 1 d510479b90ab4c9b9d6069bb2c42998d> <Trait: service 1 compute> <Trait: disk_gb 2 0> <Trait: tenant_id 1 fb1b20664781417d8270ffc4d9b0df03> <Trait: ephemeral_gb 2 0> <Trait: instance_type_id 2 6> <Trait: vcpus 2 1> <Trait: memory_mb 2 64> <Trait: instance_id 1 c29d959a-3e5d-49e2-a996-51d223cc60d4> <Trait: host 1 reverie> <Trait: request_id 1 req-7da46874-26c6-4ced-a68d-bbc7d87aa39e> <Trait: audit_period_ending 4 2015-03-27 22:00:00> <Trait: instance_type 1 m1.nano> <Trait: launched_at 4 2015-03-27 20:44:17>>]
Is it mostly to do with the event signature?