Jump to: navigation, search

Monasca/MetricNamingConventionProposal

< Monasca
Revision as of 18:05, 30 July 2015 by Dlfryar (talk | contribs)

Metric Names

Although metric names in the Monasca API can be any string the Monasca Agent uses several naming conventions as follows:

   All lowercase characters.
   '.' is used to hierarchially group. This is done for compatibility with Graphite as Graphite assumes a '.' as a delimiter.
   '_' is used to separate words in long names that are not meant to be hierarchical.

Metric Name Categories

Considering the five following attributes with a dot delimited metric name will allow future aggregation, filtering, parsing, querying, and pattern matching.

  1. proper_noun
  2. noun
  3. measurement (status, capacity, throughput, latency)
  4. type (hits, kilobytes, bytes, count, percent, state)
  5. qualifier (total, second, minute, hour, percent, current)


An abbreviated naming convention is desired in order to reduce the resource requirements to collect, transmit, and store the metrics e.g. perc in place of percent saves three bytes per metric globally.

Common measurement categories and terms

Proper Noun

apache
system
kafka
mysql
zookeeper

Noun

net
cpu
busy_worker
idle_worker

Measurement

Throughput
amount per time
Status
up, down, alive, dead, crashed, recovering, rebooting, shutting down
Capacity
full, percentage, empty
Latency
a time based measurement
Count
a quantity of some measurement

Type

The type field further explains what is being measured by specifying the unit of measure

hits
kbytes
capacity
percent
state
count

Qualifier

The final field completes the nexus on the entire measurement by specifying the quantity for the unit of measure (UOM) type field

total
second
current

Other Considerations

Dimensions

The metric names can be further complimented with the addition of dimensions. This will preserve the metric naming patterns and allow the flexibility to further annotate the metrics with dimensions. see Dimensions

Value_Meta

The value data can be further annotated using the value_meta field without the need to encode extra metadata in the metric name. see Value_Metadata

Existing and Proposed Metric Names

Proposed pattern format for metric names

proper_noun.noun.measurement.type.qualifier
Existing Name Proposed Name
apache.net.hits apache.net.throughput.hits.total
apache.net.kbytes_sec apache.net.throughput.kbytes.second
apache.net.requests_sec apache.net.throughput.requests.second
apache.net.total_kbytes apache.net.throughput.kbytes.total
apache.performance.busy_worker_count apache.busy_worker.capacity.count.total
apache.performance.cpu_load_perc apache.cpu.capacity.perccent.total
apache.performance.idle_worker_count apache.idle_worker.capacity.count.total
apache.status apache.system.status.state.current
cpu.idle_perc system.cpu.capacity.percent.total
... ...

Raw Metrics / Published Metrics

Existing Name ! Proposed Name
raw.metric.name published.metric.name