Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

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 schema:

  1. The final message format schema
  2. The mapping schema

 

The final message format schema for the ceilometer sample is:

Code Block
linenumbers
languagebashtrue
{
	"$schema    "counter_name": "http://json-schema.org/draft-04/schema#instance",
	"title    "counter_type": "Collectd Mapping Schemagauge",
	"description    "counter_unit": "instance"A,
 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"
		 "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
languagebash
linenumberstrue
{
    "$schema": "http://json-schema.org/draft-04/schema#",
    "title": "Collectd Mapping Schema",
    "description": "A mapping		}
			}
		},
		"meters": {
			"description": "Mappings from collectd meters and events to *other* meters frameworkand metersevents",
			    "type": "arrayobject",
			"items    "properties": {
				"type": "array",
				"items        "resource_id": {
					"collectd_meter_strings            "description": "string",
					"new_meterMappings from collectd resource_id to other framework resource_id",
            "type": "stringobject",
					"collectd_unit            "items": "string",
					"new_meter_unit{
                "type": "stringarray",
					"unit_conversion": "string"
				}
			}
		},
		"events": {
			"description": "Mappings from collectd events to other framework events",
			"type": "object",
			"items": {
				"type": "array",
				"items": {
					"collectd_event": "string",
					"new_event                "items": {
                    "collectd_resource_id": "string",
                    "new_resource_id": "string",
					"collectd_severity": "string",
					"new_severity": "string"
				}
			}
		},
		"collectd_plugin_to_field_map": {
			
                }
            }
        },
        "meters": {
            "description": "Mappings offrom collectd_plugin valuesmeters to other framework Fieldsmeters",
			            "type": "objectarray",
			            "items": {
				                "type": "objectarray",
				                "items": {
					"Field                    "collectd_meter_strings": "string",
					"collectd_plugin": {
					                    "new_meter": "string",
                    "typecollectd_unit": "arraystring",
						"items": {
							"collectd_plugin_name                    "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

...