Project

General

Profile

Actions

Cleanup #53686

open

mgr/dashboard/monitoring: add prometheus exporter API test

Added by Ernesto Puerta over 2 years ago.

Status:
New
Priority:
Normal
Category:
Monitoring
Target version:
% Done:

0%

Tags:
Backport:
pacific
Reviewed:
Affected Versions:
Pull request ID:

Description

For the Ceph prometheus exporter (aka mgr/exporter module), the perf-counter names become API contracts, so some integration testing should be performed to ensure metric names (perf-counter names) doesn´t change (inadvertently).

A proposal is to add a new Ceph API test (so run at CI, as well as Teuthology) that:
  • Performs a GET /metrics against the Prometheus port
  • Compares the output of it to a pre-saved template (pseudo-schema)
  • Optionally: it might perform some linting static checking:
    • Proper metric types
    • Metric naming best practices (valid chars [a-zA-Z_:][a-zA-Z0-9_:]*., starts with ceph_*, ends with [_total, _seconds, _bytes, ...])

This will mean that adding/renaming/removing metrics will lead to an error (that properly points to the issue and action to fix it).

No data to display

Actions

Also available in: Atom PDF