Module metrics

Source
Expand description

Metrics module for the application.

  • This module contains the global Prometheus registry.
  • Defines specific metrics for the application.

Modules§

server
Metrics server module

Structs§

AVAILABLE_MEMORY
Gauge for available memory in bytes.
CONTRACTS_MONITORED
Gauge for total number of contracts being monitored (across all monitors).
CPU_USAGE
Gauge for CPU usage percentage.
DISK_USAGE
Gauge for used disk space in bytes.
DISK_USAGE_PERCENT
Gauge for disk usage percentage.
MEMORY_USAGE
Gauge for memory usage in bytes.
MEMORY_USAGE_PERCENT
Gauge for memory usage percentage.
MONITORS_ACTIVE
Gauge for number of active monitors (not paused).
MONITORS_TOTAL
Gauge for total number of monitors (active and paused).
NETWORKS_MONITORED
Gauge for total number of networks being monitored.
NETWORK_MONITORS
Gauge Vector for per-network metrics.
REGISTRY
Global Prometheus registry.
TOTAL_MEMORY
Gauge for total memory in bytes.
TRIGGERS_TOTAL
Gauge for total number of triggers.

Functions§

gather_metrics
Gather all metrics and encode into the provided format.
update_monitoring_metrics
Updates metrics related to monitors, triggers, networks, and contracts.
update_system_metrics
Updates the system metrics for CPU and memory usage.