InfluxDB
Prometheus
Platforms
Metrics Naming Convention
This article explains the metrics naming convention used by HostedMetrics for the StatsD interface that is coupled to InfluxDB.
InfluxDB organizes metrics into a three-tier hierarchy: database > measurement > field.
To accomodate this structure, the metric name sent to StatsD should take the format
<measurement_name>.<field_name>
If no periods are used in the metric name, then the measurement name will be the metric name and the field name will be "value".
A few examples will help elucidate the system:
Incoming Metric Name Sent by Your Systems to StatsD |
Measurement Name Stored in InfluxDB |
Field Name Stored in InfluxDB |
---|---|---|
ocean_buoy_wave_height | ocean_buoy_wave_height | value |
ocean_buoy.wave_height | ocean_buoy | wave_height |
ocean_buoy_wave_height.value | ocean_buoy_wave_height | value |
ocean_buoy.wave_height.value | ocean_buoy.wave_height | value |
ocean_buoy.wave.height | ocean_buoy.wave | height |
ocean_buoy.wave.frequency | ocean_buoy.wave | frequency |
ocean_buoy.wind.speed | ocean_buoy.wind | speed |
ocean_buoy.wind.direction | ocean_buoy.wind | direction |
The syntax for InfluxDB tags is explained in the Code Instrumentation article.