Skip to content

Metrics

csrfn edited this page May 5, 2025 · 1 revision

Optionnally, you can run Minibridge with the argument --health-listen :8080. This will start a Health Server and expose two endpoints:

  • /: returns an HTTP code 200 if minibridge is fully functional. It is used as a health probe for Docker and Kubernetes.
  • /metrics: exposes promotheus metrics ready to be scrapped

Metrics examples

# HELP http_requests_duration_seconds The average duration of the requests
# TYPE http_requests_duration_seconds histogram
http_requests_duration_seconds_sum{method="POST",url="/message"}
http_requests_duration_seconds_count{method="POST",url="/message"}

# HELP http_requests_total The total number of requests.
# TYPE http_requests_total counter
http_requests_total{code="202",method="POST",url="/message"}

# HELP policer_request_total The total number of policer requests.
# TYPE policer_request_total counter
policer_request_total{call_type="request",decision="allow",policer_type="rego"}
policer_request_total{call_type="request",decision="deny",policer_type="rego"}
policer_request_total{call_type="response",decision="allow",policer_type="rego"}

# HELP policer_requests_duration_seconds The average duration of the policing requests
# TYPE policer_requests_duration_seconds histogram
policer_requests_duration_seconds_sum{call_type="request",policer_type="rego"}
policer_requests_duration_seconds_count{call_type="request",policer_type="rego"}
policer_requests_duration_seconds_sum{call_type="response",policer_type="rego"}
policer_requests_duration_seconds_count{call_type="response",policer_type="rego"}

# HELP process_cpu_seconds_total Total user and system CPU time spent in seconds.
# TYPE process_cpu_seconds_total counter
process_cpu_seconds_total

# HELP process_max_fds Maximum number of open file descriptors.
# TYPE process_max_fds gauge
process_max_fds

# HELP process_network_receive_bytes_total Number of bytes received by the process over the network.
# TYPE process_network_receive_bytes_total counter
process_network_receive_bytes_total

# HELP process_network_transmit_bytes_total Number of bytes sent by the process over the network.
# TYPE process_network_transmit_bytes_total counter
process_network_transmit_bytes_total

# HELP process_open_fds Number of open file descriptors.
# TYPE process_open_fds gauge
process_open_fds

# HELP process_resident_memory_bytes Resident memory size in bytes.
# TYPE process_resident_memory_bytes gauge
process_resident_memory_bytes

# HELP process_start_time_seconds Start time of the process since unix epoch in seconds.
# TYPE process_start_time_seconds gauge
process_start_time_seconds

# HELP process_virtual_memory_bytes Virtual memory size in bytes.
# TYPE process_virtual_memory_bytes gauge
process_virtual_memory_bytes

# HELP process_virtual_memory_max_bytes Maximum amount of virtual memory available in bytes.
# TYPE process_virtual_memory_max_bytes gauge
process_virtual_memory_max_bytes

# HELP promhttp_metric_handler_requests_in_flight Current number of scrapes being served.
# TYPE promhttp_metric_handler_requests_in_flight gauge
promhttp_metric_handler_requests_in_flight

# HELP tcp_connections_current The current number of TCP connection.
# TYPE tcp_connections_current gauge
tcp_connections_current

# HELP tcp_connections_total The total number of TCP connection.
# TYPE tcp_connections_total counter
tcp_connections_total

Clone this wiki locally