KxSystems / prometheus-kdb-exporter

Kdb+ exporter for Prometheus
https://code.kx.com/q/interfaces
Apache License 2.0
17 stars 9 forks source link

Comments from prometheus review #6

Open sshanks-kx opened 4 years ago

sshanks-kx commented 4 years ago

Gauges should not end in _total. summary and histogram should not be part of metric names - and there's no need to expose both for the same data, just a histogram will do.

The memory metrics sound kdb specific rather than the process metrics coming from a client library, so should be prefixed with kdb.

memory_physical_bytes is a machine-level metric, and the node exporter should be relied upon for that. You should seem to be setting the http content-type.

sshanks-kx commented 4 years ago

Comments and the metrics they are referencing:

Gauges should not end in _total.

# TYPE kdb_handles_total gauge

summary and histogram should not be part of metric names - and there's no need to expose both for the same data, just a histogram will do.

# TYPE kdb_async_histogram_seconds histogram
# TYPE kdb_async_summary_seconds summary
# TYPE kdb_http_get_histogram_seconds histogram
# TYPE kdb_http_get_summary_seconds summary
# TYPE kdb_http_post_histogram_seconds histogram
# TYPE kdb_http_post_summary_seconds summary
# TYPE kdb_sync_histogram_seconds histogram
# TYPE kdb_sync_summary_seconds summary
# TYPE kdb_ts_histogram_seconds histogram
# TYPE kdb_ts_summary_seconds summary
# TYPE kdb_ws_histogram_seconds histogram
# TYPE kdb_ws_summary_seconds summary

The memory metrics sound kdb specific rather than the process metrics coming from a client library, so should be prefixed with kdb.

# TYPE memory_usage_bytes gauge
# TYPE memory_heap_bytes gauge
# TYPE memory_heap_peak_bytes counter
# TYPE memory_heap_limit_bytes gauge
# TYPE memory_mapped_bytes gauge
# TYPE memory_physical_bytes gauge
# TYPE kdb_syms_memory_bytes counter

memory_physical_bytes is a machine-level metric, and the node exporter should be relied upon for that.

# TYPE memory_physical_bytes gauge

You should seem to be setting the http content-type.

# TYPE kdb_http_get_total counter
# TYPE kdb_http_post_total counter
# TYPE kdb_http_get_err_total counter
# TYPE kdb_http_post_err_total counter
# TYPE kdb_http_get_summary_seconds summary
# TYPE kdb_http_post_summary_seconds summary
# TYPE kdb_http_get_histogram_seconds histogram
# TYPE kdb_http_post_histogram_seconds histogram