Last active
December 20, 2015 18:49
-
-
Save chetan/6178669 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "Short name for this script", | |
// Hash of options accepted by this script, via stdin | |
// [OPTIONAL] | |
"options": { | |
"option_name" : { | |
"name" : "Sample option", | |
"desc" : "Description of option (defaults to 'foo')", | |
// Type of option | |
// This determines the type of entry field displayed in the UI | |
// | |
// Possible values: enum, text | |
// enum: if no values given, then the script will be queried for a list dynamically | |
// text: text entry | |
"type" : "enum", | |
// List of possible values for enums | |
"values" : [ "foo", "bar", "baz" ], | |
// Force a query even when "values" are given above | |
"query" : true, | |
// [OPTIONAL] Default value, if any | |
"default": "foo", | |
} | |
} | |
// MONITORING SCRIPTS ONLY | |
// --------------------------------------------------------------------------- | |
// Base key name which will be prepended to all reported metrics | |
"key" : "base.key", | |
// A hash of metrics reported by this script | |
"metrics" : { | |
// Metric to report | |
// Will be sent as: base.key.metric_key | |
"metric_key" : { | |
"name" : "Name of this value", | |
"desc" : "Description of this value", | |
// Unit of value | |
// Possible values: %, MB, GB, TB | |
// | |
// [OPTIONAL] default: null | |
"unit" : "%", | |
// Whether or not this value is optional | |
// This should be set when a value is dependent on some system state | |
// Primarily used for testing | |
// | |
// [OPTIONAL] default: false | |
"optional" : false, | |
// Range of expected values | |
// Primarily used for testing | |
// | |
// Ranges can be specified as follows: | |
// 0..100 = 0 to 100, inclusive | |
// 0+ = a positive number, including zero | |
// >0 = greater than zero | |
// <0 = less than zero | |
// >=0 = greater than or equal to zero | |
// <=-5 = less than or equal to -5 | |
"range" : "0..100", | |
// Platforms for which this value will be returned | |
// Primarily used for testing | |
// | |
// Possible values: linux, osx, windows | |
// [OPTIONAL] default: null (all platforms supported) | |
"platforms" : [ "linux" ] | |
} | |
}, | |
// Rename metric keys reported by the script | |
// | |
// This is useful for working with scripts imported from some other system | |
// (e.g. Scout) when we do not want to alter the script itself. | |
// | |
// [OPTIONAL] | |
"rename" : { | |
// metric keys named "foo" will be replaced with "bar" | |
// i.e., base.key.foo -> base.key.bar | |
"foo" : "bar" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment