PrivMX DOCS
Version 2.6/Concepts

Metrics

PrivMX Bridge provides the /metrics endpoint, which returns metrics in a format compatible with Prometheus.
The endpoint is protected with HTTP Basic Authorization.


Metrics Endpoint

  • Endpoint: /metrics
  • Access Control: Requires HTTP Basic Authorization
  • Scrape Interval: 1 minute (data older than 1 minute is discarded)
  • Bucket Clearing: After each collection, the internal metrics bucket is cleared. This enables support for scrape intervals shorter than 1 minute.

Metrics Collected

The /metrics endpoint exposes the following metrics:

  • privmx_bridge_error_gauge

    Type: Gauge
    Description: Tracks the number of errors.

  • privmx_bridge_cpu_execution_time_gauge

    Type: Gauge
    Description: Measures the CPU time taken for executions in milliseconds.

  • privmx_bridge_in_traffic_gauge

    Type: Gauge
    Description: Records incoming traffic volume in bytes.

  • privmx_bridge_out_traffic_gauge

    Type: Gauge
    Description: Records outgoing traffic volume in bytes.

  • privmx_bridge_request_gauge

    Type: Gauge
    Description: Counts the number of requests.


Prometheus Format

Each metric is exposed in the Prometheus gauge format:

# TYPE <metric_name> gauge

Example Scrape Output

# TYPE privmx_bridge_error_gauge gauge
privmx_bridge_error_gauge 0

# TYPE privmx_bridge_request_gauge gauge
privmx_bridge_request_gauge 152

# TYPE privmx_bridge_in_traffic_gauge gauge
privmx_bridge_in_traffic_gauge 2048

# TYPE privmx_bridge_out_traffic_gauge gauge
privmx_bridge_out_traffic_gauge 1024

# TYPE privmx_bridge_cpu_execution_time_gauge gauge
privmx_bridge_cpu_execution_time_gauge 7

We use cookies on our website. We use them to ensure the proper functioning of the site and, if you agree, for purposes we set, such as analytics or marketing.

On this page