...
Proposal 1 is too high level and doesn't get into the internals of what meters get mapped to what and what units should be associated with the meters/events - in essence it doesn't improve on what's there today for overlapping meters. However is good for new meters.
Proposal 2
involves 2 Involves 2 schema:
- The final message format schema
- The mapping schema
The final message format schema for the ceilometer sample is:
Code Block | ||||
---|---|---|---|---|
| ||||
{ "$schemacounter_name": "http://json-schema.org/draft-04/schema#instance", "title": "Collectd Mapping Schema", "descriptioncounter_type": "Agauge", mapping from collectd meters and events to *other* meters and events", "type": "object", "properties": { "resource_id": { "description": "Mappings from collectd resource_id to other framework resource_id", "type": "object", "items": { "type": "array", "items": { "collectd_resource_id": "string", "new_resource_id": "string" } } }, "meters": { "description": "Mappings from collectd meters to other framework meters", "type": "array", "items": { "type": "array", "items": { "collectd_meter_strings": "string", "new_meter": "string", "collectd_unit": "string", "new_meter_unit": "string", "unit_conversion": "string" } } }, "events": { "description": "Mappings from collectd events to other framework events", "counter_unit": "instance", "counter_volume": 1.0, "message_id": "5460acce-4fd6-480d-ab18-9735ec7b1996", "project_id": "35b17138-b364-4e6a-a131-8f3099c5be68", "recorded_at": "2015-01-01T12:00:00", "resource_id": "bd9431c1-8d69-4ad3-803a-8d4a6b89fd36", "resource_metadata": { "name1": "value1", "name2": "value2" }, "source": "openstack", "timestamp": "2015-01-01T12:00:00", "user_id": "efd87807-12d2-4b38-9c70-5f5c2ac427ff" } |
The proposed mapping schema is:
Code Block | ||||
---|---|---|---|---|
| ||||
{ "$schema": "http://json-schema.org/draft-04/schema#", "title": "Collectd Mapping Schema", "description": "A mapping from collectd meters and events to *other* meters and events", "type": "object", "items "properties": { "type": "array", "items "resource_id": { "collectd_event": "string", "new_event "description": "string", "collectd_severity": "string", "new_severity": "string" } } }, "collectd_plugin_to_field_map": { "description": "Mappings of collectd_plugin values to Fields", Mappings from collectd resource_id to other framework resource_id", "type": "object", "items": { "type": "object", "items": { "Field": "string", "collectd_plugin": { "type": "array", "items": { "collectd_pluginresource_nameid": "string" } } } } } } }, "new_resource_id": "string" } } }, "meters": { "description": "Mappings from collectd meters to other framework meters", "type": "array", "items": { "type": "array", "items": { "collectd_meter_strings": "string", "new_meter": "string", "collectd_unit": "string", "new_meter_unit": "string", "unit_conversion": "string" } } }, "events": { "description": "Mappings from collectd events to other framework events", "type": "object", "items": { "type": "array", "items": { "collectd_event": "string", "new_event": "string", "collectd_severity": "string", "new_severity": "string" } } }, "collectd_plugin_to_field_map": { "description": "Mappings of collectd_plugin values to Fields", "type": "object", "items": { "type": "object", "items": { "Field": "string", "collectd_field": { "type": "array", "items": { "collectd_plugin_name": "string", "collectd_plugin_type": "string" "collectd_plugin_type_instance": "string" } } } } } } } |
Taking the following ceilometer meter as an example:
Code Block |
---|
- name: 'vcpus'
event_type: 'compute.instance.*'
type: 'gauge'
unit: 'vcpu'
volume: $.payload.vcpus
user_id: $.payload.user_id
project_id: $.payload.tenant_id
resource_id: $.payload.instance_id
|
References
http://docs.openstack.org/admin-guide/telemetry-data-collection.html
...