mkmetric

mkmetric is a shortcut to the uid assign metrics <metric> command where you can provide multiple metric names in a single call and UIDs will be assigned or retrieved. If any of the metrics already exist, the assigned UID will be returned.

Parameters

mkmetric metric [metrics]

Simply supply one or more space separate metric names in the call.

Example

mkmetric sys.cpu.user sys.cpu.nice sys.cpu.idle

Response

The response is the literal "metrics" followed by the name of the metric and a Java formatted byte array representing the UID assigned or retrieved for each metric, one per line.

Example

metrics sys.cpu.user: [0, 0, -58]
metrics sys.cpu.nice: [0, 0, -57]
metrics sys.cpu.idle: [0, 0, -59]

© 2010–2016 The OpenTSDB Authors
Licensed under the GNU LGPLv2.1+ and GPLv3+ licenses.
http://opentsdb.net/docs/build/html/user_guide/cli/mkmetric.html