Metric Formats
Various metric formats are employed in monitoring systems to measure performance, consumption, and other software properties. These formats serve as standardized ways to represent and transmit metric data. Here are some notable metric formats used in monitoring systems:
Prometheus format
Prometheus, a widely used monitoring system, defines its format for metrics, including types like Counter, Gauge, Histogram, and Summary.
JSON format
JSON is a lightweight, easy-to-read data-interchange format.
Warning: JSON data should be compressed using the Snappy protocol. Snappy provides fast compression and decompression, making storing and transmitting JSON data more efficient.
Metric source classification
From a technical standpoint, there is no distinct categorization of metric sources. Any device, software, or application capable of generating and presenting metrics compatible with Prometheus is considered part of this group. Nonetheless, in most instances, the Prometheus agent emerges as the optimal solution. Here, we can name some common agents that are capable of producing Prometheus-compatible metrics:
Prometheus
Grafana Agent
OpenTelemetry
FluentBit
Metrics examples
Metrics in JSON format
{
"input": {
"cpu.0": {
"records": 8,
"bytes": 2536
}
},
"output": {
"stdout.0": {
"proc_records": 5,
"proc_bytes": 1585,
"errors": 0,
"retries": 0,
"retries_failed": 0
}
}
}
Metrics in Prometheus format
fluentbit_input_records_total{name="cpu.0"} 57 1509150350542
fluentbit_input_bytes_total{name="cpu.0"} 18069 1509150350542
fluentbit_output_proc_records_total{name="stdout.0"} 54 1509150350542
fluentbit_output_proc_bytes_total{name="stdout.0"} 17118 1509150350542
fluentbit_output_errors_total{name="stdout.0"} 0 1509150350542
fluentbit_output_retries_total{name="stdout.0"} 0 1509150350542
fluentbit_output_retries_failed_total{name="stdout.0"} 0 1509150350542
Last updated
Was this helpful?