Versions Compared

Key

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

...

Code Block
languagebash
linenumberstrue
{
    "$schema": "http://json-schema.org/draft-04/schema#",
    "title": "collectd Base Schema",
    "description": "A schema that defines the collectd meters and events",
    "definitions": {
		        "collectd_field": {
			            "description": "collectd_fields",
			            "type": "object",
			            "properties": {
				                "anyOf" : {
					                    "Interval" : {
						                        "description": "interval at which to expect a new value",
						"type": "number"
					},
					"host" : {
						"description": "used to identify the host",
						"                        "type": "string"
					},
					"message" : {
						"description": "The notification message",
						"type": "string"
					},
					"metadata" : {
						"description": "an opaque data structure that enables the passing of additional information about a value list",
						"type": "string"
					},
					"plugin" : {
						number"
                    },
                    "host" : {
                        "description": "used to identify the pluginhost",
						"type": "string"
					},
					"plugin instance" : {
						"description": "used to group a set of values together",
						                        "type": "string"
					},
					"severity" : {
						"description": "can be one of OKAY, WARNING, and FAILURE",
						"type": "string"
					},
					"time" : {
						"description": "Time stamp at which the value was collected",
						"type": "number"
					},
					"type" : {
						                    },
                    "message" : {
                        "description": "unitThe used to measure a value",
						"type": "string"
					},
					"type instance " : {
						"description": "used to distinguish between values that have an identical type",
						"notification message",
                        "type": "string"
					},
					"values" : {
						"type": "object",
						"anyOf" : {
							 "absolute" : { "type" : "number" } ,
							 "counter" : { "type" : "number" },
							 "derive                    "metadata" : { "type" : "number" },
							 "gauge" : { "type" : "number" }
						}
					},
					"value length" : {
						"description": "The number of values in the data set",
						"type": "number"
					}
				}
			}
		},
		"mappings": {
			
                        "description": "an opaque data structure that enables the passing of additional information about a value list",
                        "type": "string"
                    },
                    "plugin" : {
                        "description": "used to identify the plugin",
                        "type": "string"
                    },
                    "plugin instance" : {
                        "description": "used to group a set of values together",
                        "type": "string"
                    },
                    "severity" : {
                        "description": "can be one of OKAY, WARNING, and FAILURE",
                        "type": "string"
                    },
                    "time" : {
                        "description": "Time stamp at which the value was collected",
                        "type": "number"
                    },
                    "type" : {
                        "description": "unit used to measure a value",
                        "type": "string"
                    },
                    "type instance " : {
                        "description": "used to distinguish between values that have an identical type",
                        "type": "string"
                    },
                    "values" : {
                        "type": "object",
                        "anyOf" : {
                             "absolute" : { "type" : "number" } ,
                             "counter" : { "type" : "number" },
                             "derive" : { "type" : "number" },
                             "gauge" : { "type" : "number" }
                        }
                    },
                    "value length" : {
                        "description": "The number of values in the data set",
                        "type": "number"
                    }
                }
            }
        },
        "mappings": {
            "description": "mapping pair",
			            "type": "object",
			            "properties": {
			                "oneOf": {
				                "$ref": "#/definitions/collectd_field",
				
                "collectd_string": { "type": "string" }
				},
				                },
                "new_string": { "type": "string" }
			}
		},
		"timestamps": {
            "description": "Mappings from collectd timestamps to other framework timestamps",
    }
        },
        "typemappings_with_conversion": "object",{
            "properties": {
				"mappings": {
					"description": "array of mappingsMappings from collectd timestamps to other frameworksframework timestamps",
					            "type": "arrayobject",
					"items": {  
						"$ref": "#/definitions/mapping",
						"conversion": "string"
					}
				}
			},
			"required": [ "mappings" ]
            "properties": {
                },
		"unitsmappings": {
                    "description": "Mappingsarray of mappings from collectd units to other framework unitsframeworks",
                    "type": "objectarray",
                    "propertiesitems": {
				"mappings": {
					"description": "array of mappings from collectd to other frameworks",
					"type": "array",
					"items": {  
						  
                        "$ref": "#/definitions/mapping",
						"unit_                        "conversion": "string"
					}
				}
			},
			                    }
                }
            },
            "required": [ "mappings" ]
        }	
	    },
	    "field_mappings": {
		        "description": "array of field_mappings",
		        "type": "array",
		"items": {
				        "items": {
            "anyOf":{
                "$ref": "#/definitions/mappings",
				                "$ref1": "#/definitions/timestampsmappings_with_conversion",
				"$ref2": "#/definitions/units"
		}
	
            }
        }
    }
}

 

Taking the following ceilometer meter as an example:

...