Module metrics

Source
Expand description

This module provides HTTP endpoints for interacting with system metrics.

§Endpoints

  • /metrics: Returns a list of all available metric names in JSON format.
  • /metrics/{metric_name}: Returns the details of a specific metric in plain text format.
  • /debug/metrics/scrape: Triggers an update of system metrics and returns the result in plain text format.

§Usage

These endpoints are designed to be used with a Prometheus server to scrape and monitor system metrics.

Structs§

list_metrics
Metrics routes implementation
metric_detail
Returns the details of a specific metric in plain text format.
scrape_metrics
Triggers an update of system metrics and returns the result in plain text format.

Functions§

init
Initializes the HTTP services for the metrics module.