Skip to main content

Metrics Collected

The agent collects system metrics via gopsutil v4 and Linux /proc files, plus plugin metrics from configured integrations. All metrics follow the OpenMetrics naming convention.

Raw values: The agent emits raw counters and gauges. The derived ratio metrics the UI shows (cpu_usage_ratio, memory_used_ratio, disk_used_ratio, …) are computed at query time in the backend from these raw values, scoped to the caller's tenant — see Derived metrics.

System Metrics

Collected automatically on every managed host. No configuration required.

CPU

MetricTypeUnitDescription
cpu_user_seconds_totalCountersecondsTime spent in user mode
cpu_system_seconds_totalCountersecondsTime spent in kernel mode
cpu_nice_seconds_totalCountersecondsTime spent in low-priority user mode
cpu_idle_seconds_totalCountersecondsTime spent idle
cpu_iowait_seconds_totalCountersecondsTime spent waiting for I/O
cpu_irq_seconds_totalCountersecondsTime spent servicing hardware interrupts
cpu_softirq_seconds_totalCountersecondsTime spent servicing software interrupts
cpu_steal_seconds_totalCountersecondsTime stolen by hypervisor
cpu_load1Gauge1-minute load average
cpu_load5Gauge5-minute load average
cpu_load15Gauge15-minute load average
Derived (computed at query time)

cpu_usage_ratio and cpu_iowait_ratio are computed at query time in the backend from the per-mode counters above. They produce the same 0.0–1.0 ratios the frontend displays.

Memory

MetricTypeUnitDescription
memory_total_bytesGaugebytesTotal physical memory
memory_used_bytesGaugebytesMemory in use (excluding buffers/cache)
memory_available_bytesGaugebytesMemory available without swapping
memory_buffers_bytesGaugebytesKernel buffer cache
memory_cached_bytesGaugebytesPage cache (reclaimable)
memory_swap_total_bytesGaugebytesTotal swap space
memory_swap_free_bytesGaugebytesFree swap space
Derived (computed at query time)

memory_used_ratio and memory_swap_used_ratio are computed at query time in the backend from raw bytes.

Disk

Per-partition and per-device metrics. Pseudo-filesystems (tmpfs, sysfs, proc, overlay) are excluded.

Usage (per partition):

MetricTypeUnitLabelsDescription
disk_total_bytesGaugebytesmount, deviceTotal partition size
disk_used_bytesGaugebytesmount, deviceUsed space
disk_free_bytesGaugebytesmount, deviceFree space
disk_inodes_totalGaugemount, deviceTotal inodes
disk_inodes_freeGaugemount, deviceFree inodes

I/O (per device):

MetricTypeUnitLabelsDescription
disk_read_bytes_totalCounterbytesdeviceTotal bytes read
disk_written_bytes_totalCounterbytesdeviceTotal bytes written
disk_reads_totalCounterdeviceTotal read operations
disk_writes_totalCounterdeviceTotal write operations
disk_io_time_ms_totalCountermsdeviceTime spent doing I/O
disk_io_weighted_ms_totalCountermsdeviceWeighted I/O time (saturation signal)
disk_io_in_progressGaugedeviceI/O operations currently in flight
disk_read_time_ms_totalCountermsdeviceTotal read latency
disk_write_time_ms_totalCountermsdeviceTotal write latency
Derived (computed at query time)

disk_used_ratio and disk_inodes_used_ratio are computed at query time in the backend from raw values.

Disk saturation

disk_io_in_progress > 0 consistently indicates disk saturation. disk_io_weighted_ms_total is the USE method's saturation signal for storage.

Network

Per-interface metrics. The loopback interface (lo) is excluded.

MetricTypeUnitLabelsDescription
network_receive_bytes_totalCounterbytesinterfaceTotal bytes received
network_transmit_bytes_totalCounterbytesinterfaceTotal bytes transmitted
network_receive_packets_totalCounterinterfaceTotal packets received
network_transmit_packets_totalCounterinterfaceTotal packets transmitted
network_receive_errors_totalCounterinterfaceTotal receive errors
network_transmit_errors_totalCounterinterfaceTotal transmit errors
network_receive_drops_totalCounterinterfaceTotal receive drops (buffer exhaustion)
network_transmit_drops_totalCounterinterfaceTotal transmit drops

Pressure Stall Information (PSI)

Available on Linux kernel 4.20+. Skipped silently on older kernels.

MetricTypeDescription
psi_cpu_some_avg10Gauge% of time tasks stalled on CPU (10s avg)
psi_cpu_some_avg60Gauge% of time tasks stalled on CPU (60s avg)
psi_cpu_some_total_microsecondsCounterTotal CPU stall time
psi_memory_some_avg10Gauge% of time some tasks stalled on memory (10s avg)
psi_memory_some_avg60Gauge% of time some tasks stalled on memory (60s avg)
psi_memory_full_avg10Gauge% of time all tasks stalled on memory (10s avg)
psi_memory_full_avg60Gauge% of time all tasks stalled on memory (60s avg)
psi_io_some_avg10Gauge% of time some tasks stalled on I/O (10s avg)
psi_io_some_avg60Gauge% of time some tasks stalled on I/O (60s avg)
psi_io_full_avg10Gauge% of time all tasks stalled on I/O (10s avg)
psi_io_full_avg60Gauge% of time all tasks stalled on I/O (60s avg)
Root cause analysis

PSI is the single most valuable metric for automated root cause analysis. Unlike CPU usage (which can be 100% and healthy), PSI measures actual stall time — when tasks are blocked waiting for resources.

Kernel & System State

MetricTypeDescription
vmstat_oom_kill_totalCounterOOM kill events (from /proc/vmstat)
vmstat_pgmajfault_totalCounterMajor page faults (memory pressure → disk I/O)
vmstat_pswpin_totalCounterPages swapped in
vmstat_pswpout_totalCounterPages swapped out
context_switches_totalCounterSystem-wide context switches
processes_created_totalCounterTotal processes created (fork rate)
processes_runningGaugeProcesses currently running
processes_blockedGaugeProcesses blocked on I/O
entropy_availableGaugeAvailable entropy (always 256 on kernel 5.4+)

TCP & Resource Limits

MetricTypeDescription
sockstat_tcp_inuseGaugeTCP sockets in use
sockstat_tcp_orphanGaugeOrphaned TCP sockets (no process)
sockstat_tcp_twGaugeTCP sockets in TIME_WAIT state
sockstat_sockets_usedGaugeTotal sockets in use
filefd_allocatedGaugeSystem-wide allocated file descriptors
filefd_maxGaugeSystem-wide file descriptor limit
conntrack_entriesGaugeConntrack table entries (skipped if netfilter not loaded)

Process Metrics

Top-N process metrics are exported to VictoriaMetrics alongside system metrics. Only the top 20 processes by CPU usage are exported per collection cycle to control cardinality.

MetricTypeUnitLabelsDescription
process_cpu_usage_ratioGaugeratiopid, process_name, usernamePer-process CPU usage (0.0–1.0)
process_memory_usage_ratioGaugeratiopid, process_name, usernamePer-process memory usage (0.0–1.0)
process_memory_rss_bytesGaugebytespid, process_name, usernameResident Set Size
process_threadsGaugepid, process_name, usernameThread count
note

The full process list is stored in PostgreSQL and available via GET /api/v1/hosts/{id}/processes. Only the top 20 by CPU are exported as time-series metrics to VictoriaMetrics.

Drill-down endpoint: GET /api/v1/hosts/{id}/processes/{pid}/metrics?process_name=X returns all 4 process metrics as time-series for a specific process. The process_name parameter is required to disambiguate PID reuse across collection cycles.

Integration Metrics

Plugin collectors extend monitoring beyond system metrics. Each plugin injects a collector=<name> label into all its metrics for differentiation.

PostgreSQL

See the PostgreSQL Integration page for setup and configuration.

MetricTypeUnitLabelsDescription
pg_connections_activeGaugeActive connections
pg_connections_idleGaugeIdle connections
pg_connections_maxGaugeMaximum allowed connections
pg_blocks_hit_totalCounterBuffer cache block hits
pg_blocks_read_totalCounterDisk block reads
pg_replication_lag_secondsGaugesecondsReplication lag
pg_database_size_bytesGaugebytesdatabaseDatabase size
pg_deadlocks_totalCounterTotal deadlocks
pg_xact_commit_totalCounterTotal committed transactions
pg_xact_rollback_totalCounterTotal rolled-back transactions
pg_dead_tuplesGaugetableDead rows (top 50 tables)
pg_stat_statements_countGaugeTracked query statements
pg_stat_statements_calls_totalCounterTotal statement executions
pg_stat_statements_time_seconds_totalCountersecondsTotal statement execution time
pg_stat_statements_slow_queriesGaugeStatements with mean > 100ms
Derived (computed at query time)

pg_cache_hit_ratio is computed at query time in the backend from pg_blocks_hit_total and pg_blocks_read_total.

note

pg_stat_statements metrics require the PostgreSQL extension to be enabled. If the extension is not installed, these metrics are silently skipped.

Nginx

See the Nginx Integration page for setup and configuration.

MetricTypeUnitLabelsDescription
nginx_connections_activeGaugeCurrent active connections
nginx_connections_accepted_totalCounterTotal accepted connections
nginx_connections_handled_totalCounterTotal handled connections
nginx_requests_totalCounterTotal HTTP requests
nginx_connections_readingGaugeConnections reading request header
nginx_connections_writingGaugeConnections writing response
nginx_connections_waitingGaugeIdle keep-alive connections

Docker

See the Docker Integration page for setup and configuration.

MetricTypeUnitLabelsDescription
docker_containersGaugestateContainer count by state (running, exited, created, etc.)
docker_container_cpu_seconds_totalCountersecondscontainer_name, container_idCumulative CPU time consumed
docker_container_memory_used_bytesGaugebytescontainer_name, container_idMemory usage minus cache
docker_container_memory_limit_bytesGaugebytescontainer_name, container_idMemory limit (omitted if unlimited)
docker_container_network_receive_bytes_totalCounterbytescontainer_name, container_idTotal bytes received (all interfaces)
docker_container_network_transmit_bytes_totalCounterbytescontainer_name, container_idTotal bytes transmitted (all interfaces)
docker_container_block_read_bytes_totalCounterbytescontainer_name, container_idTotal block device bytes read
docker_container_block_write_bytes_totalCounterbytescontainer_name, container_idTotal block device bytes written
Derived (computed at query time)

docker_container_cpu_usage_ratio and docker_container_memory_usage_ratio are computed at query time in the backend.

note

Per-container metrics are only collected for running containers. Memory limit metrics are omitted when the container has no memory limit set.

Agent Self-Monitoring

The agent collects metrics about its own resource usage. These are always enabled and require no configuration. All metrics carry agent_version and hostname labels, enabling cross-version regression detection and multi-host comparison.

A pre-built Grafana dashboard is available at infra/grafana/dashboards/agent-resources.json.

Process

MetricTypeUnitDescription
agent_build_infoGaugeConstant 1; build identity carried in labels (agent_version, hostname, go_version). Use count by (agent_version) (agent_build_info) to see the fleet's version distribution and observe a rollout landing.
agent_uptime_secondsGaugesecondsAgent process uptime
agent_cpu_seconds_totalCountersecondsCumulative CPU time (user + system)
agent_memory_rss_bytesGaugebytesResident set size
agent_memory_vms_bytesGaugebytesVirtual memory size
agent_open_fdsGaugeOpen file descriptors
agent_threadsGaugeOS thread count
agent_ctx_switches_voluntary_totalCounterVoluntary context switches
agent_ctx_switches_involuntary_totalCounterInvoluntary context switches
agent_io_read_bytes_totalCounterbytesProcess disk read bytes
agent_io_write_bytes_totalCounterbytesProcess disk write bytes
Derived (computed at query time)

agent_cpu_ratio is computed at query time in the backend from agent_cpu_seconds_total.

Go Runtime

MetricTypeUnitDescription
agent_go_heap_alloc_bytesGaugebytesGo heap allocation
agent_go_heap_sys_bytesGaugebytesGo heap obtained from OS
agent_go_heap_objectsGaugeLive heap object count
agent_go_stack_bytesGaugebytesGo stack memory in use
agent_go_sys_bytesGaugebytesTotal Go memory from OS
agent_go_memlimit_bytesGaugebytesSoft memory limit (only present when PROXIMA_AGENT_MEMORY_LIMIT_MB is set)
agent_goroutinesGaugeGoroutine count
agent_gc_cycles_totalCounterGC cycle count
agent_gc_pause_seconds_totalCountersecondsTotal GC pause time

NATS Transport

MetricTypeUnitDescription
agent_nats_messages_out_totalCounterMessages published to NATS
agent_nats_bytes_out_totalCounterbytesBytes published to NATS
agent_nats_messages_in_totalCounterMessages received from NATS (request-reply)
agent_nats_bytes_in_totalCounterbytesBytes received from NATS
agent_nats_reconnects_totalCounterNATS reconnection count
agent_nats_outbox_lengthGaugeOutbox queue depth (indicates backpressure when > 0)
agent_nats_rtt_secondsGaugesecondsRound-trip time to NATS server

Offline Buffer

These metrics are present only when the transport exposes disk-buffer stats. While NATS is unreachable, the agent buffers outgoing messages to disk and replays them on reconnect.

MetricTypeUnitDescription
agent_buffer_messagesGaugeMessages currently buffered to disk
agent_buffer_bytesGaugebytesBytes currently buffered to disk
agent_buffer_dropped_totalCounterMessages dropped because the buffer was full
agent_buffer_replayed_totalCounterBuffered messages successfully replayed after reconnect

Healthcheck

These metrics are present only when the healthcheck subsystem is active (i.e., healthcheck rules are configured for the host).

MetricTypeUnitDescription
agent_healthcheck_scans_totalCounterTotal healthcheck scans completed
agent_healthcheck_last_duration_secondsGaugesecondsDuration of last healthcheck scan
agent_healthcheck_last_passedGaugeChecks passed in last scan
agent_healthcheck_last_failedGaugeChecks failed in last scan
agent_healthcheck_last_totalGaugeTotal checks in last scan
agent_healthcheck_last_findingsGaugeDetailed scanner findings (e.g. CVEs, OpenSCAP rule results) recorded in last scan

Config Cache

These metrics are present only when the agent config sync subsystem is active.

MetricTypeUnitDescription
agent_configcache_configs_cachedGaugeNumber of cached config types
agent_configcache_versionGaugeMax version across cached configs

Resource Limits

The agent supports configurable resource limits:

Environment VariableDefaultDescription
PROXIMA_AGENT_MEMORY_LIMIT_MB— (disabled)Go soft memory limit via debug.SetMemoryLimit
PROXIMA_AGENT_COLLECTOR_TIMEOUT30sPer-collector context deadline; timed-out collectors degrade gracefully

Derived metrics (computed at query time)

The ratio metrics the UI and pc CLI show are not stored — the backend computes them from the raw values above at query time, scoped to the caller's VictoriaMetrics tenant. A request for a derived name is rewritten into the equivalent MetricsQL expression, so callers keep querying the same names:

Derived MetricSource Expression
cpu_usage_ratioSum of non-idle CPU modes / total CPU time
cpu_iowait_ratioiowait / total CPU time
memory_used_ratiomemory_used_bytes / memory_total_bytes
memory_swap_used_ratio1 - (swap_free / swap_total)
disk_used_ratiodisk_used_bytes / disk_total_bytes
disk_inodes_used_ratio1 - (inodes_free / inodes_total)
docker_container_cpu_usage_ratiorate(cpu_seconds_total)
docker_container_memory_usage_ratiomemory_used / memory_limit
pg_cache_hit_ratiorate(blocks_hit) / (rate(blocks_hit) + rate(blocks_read))
agent_cpu_ratiorate(agent_cpu_seconds_total)

Why query-time, not recording rules

These were originally produced by vmalert recording rules, which wrote the computed series back into VictoriaMetrics. That does not work with the platform's per-client VM tenancy: host metrics live in one tenant per client, but OSS vmalert is single-tenant per instance and cannot write derived series into each client tenant (per-group tenant / -clusterMode is a VictoriaMetrics Enterprise feature, and this cluster's multitenant query endpoint won't enumerate the client tenants). Computing at query time needs no recording rules, no per-tenant infrastructure, and covers any new client automatically — so vmalert and its rules were removed entirely. Background: docs/superpowers/specs/2026-06-05-vmalert-multitenant-recording-rules-design.md.

Adding a derived metric

Add an entry to the computedMetrics registry in backend/internal/metrics/computed.go — a build function that renders the MetricsQL expression for a label scope (set container: true for per-container metrics, seriesSource for the raw metric whose labels_key enumerates its series). The host / environment / client / container query builders and the metric-name lists pick it up automatically.

Backend Self-Monitoring

The backend exposes Prometheus metrics at /metrics via the OpenTelemetry SDK. These are scraped by vmagent and stored in VictoriaMetrics under account 0 (separate from tenant-scoped agent metrics). Subsystems include HTTP, Auth, PQL Search, NATS Workers, VictoriaMetrics Client, Tenant Cache, Change Detection, Log Collection, Healthcheck, Compliance, Alerting, Credentials, Config Sync, Terminal, Fleet, and Database connection pools.

For the full metric list with types, labels, and descriptions, see Prometheus Metrics Reference.

Fleet (agent self-update)

MetricTypeLabelsDescription
proxima_fleet_rollouts_totalcounterstatus (created/paused/completed/aborted)Rollout lifecycle transitions
proxima_fleet_rollouts_activegaugeCurrently active rollouts
proxima_fleet_agent_updates_totalcounterstatus (sent/healthy/failed/timed_out/skipped_offline)Per-agent update transitions
proxima_fleet_update_duration_secondshistogramRollout duration from start to terminal status
proxima_fleet_auth_denied_totalcounterTenant/scope denials on rollout requests

Label Schema

Every metric stored in VictoriaMetrics includes these system labels:

LabelDescription
__name__Metric name (e.g., cpu_user_seconds_total)
host_idHost UUID
environment_idEnvironment UUID
labels_keyDeterministic key from sorted label pairs (e.g., device=sda,mount=/)

Plus the original agent labels (e.g., device, mount, interface, collector, database, table).

The labels_key enables series discovery — the API endpoint GET /hosts/:id/metrics/:name/series returns all distinct labels_key values, allowing the frontend to enumerate and query each series individually.