Skip to content

Metrics

Metric endpoints, labels, recording rules, and queries for INFRA Victoria observability components.

INFRA monitors VictoriaMetrics, VictoriaLogs, VictoriaTraces, VMAlert, Alertmanager, Grafana, Nginx Exporter, and Blackbox Exporter. Targets come from roles/infra/templates/prometheus/infra.yml.j2; scrape jobs are defined in roles/infra/templates/victoria/prometheus.yml.

Component versions and enabled services affect the raw metric set. This page lists scrape targets, rules, and common metrics for the Victoria stack. See Monitoring System for site-wide counts.

Metric Definitions and Counts

  • Raw metrics: Produced by components or exporters. Read TYPE and HELP at /metrics for their types and meanings.
  • Recorded metrics: Computed from expressions by vmalert and queried in VictoriaMetrics. They have no independent TYPE metadata and cannot all be classified as Counter or Gauge.
  • Scrape status: up and scrape_* are generated by the collection system. up=1 indicates a successful scrape; database and application availability still require functional checks.

Histogram / Summary _bucket, _sum, and _count are different samples of the same metric family. Historical table rows, recording rules, and live time series count different objects and cannot be added together.

Scrape Endpoints and Labels

All targets below use job=infra and HTTP /metrics. The default target file is /infra/targets/infra/infra-<infra_seq>.yml.

ComponentDefault PortclsInstance Label ins
Nginx Exporter9113nginxnginx-<infra_seq>
VictoriaMetrics8428vmetricsvmetrics-<infra_seq>
VictoriaLogs9428vlogsvlogs-<infra_seq>
VictoriaTraces10428vtracesvtraces-<infra_seq>
VMAlert8880vmalertvmalert-<infra_seq>
Alertmanager9059alertmanageralertmanager-<infra_seq>
Blackbox Exporter9115blackboxblackbox-<infra_seq>
Grafana3000grafanagrafana-<infra_seq>

Each target also carries ip and the scrape endpoint instance. The template does not inject the old type label; use cls to distinguish components. Targets are registered only for enabled components. VMAlert requires both vmalert_enabled and vmetrics_enabled; Nginx target registration depends on nginx_enabled.

Blackbox Exporter’s own metrics belong to job=infra. ICMP probe_* metrics produced through /probe belong to the separate job=ping. These are different target types.

Current Recording Rules

files/victoria/rules/infra.yml defines 2 recording rules, evaluated by vmalert and written back to VictoriaMetrics:

MetricSource ExpressionMeaning
infra_upup{job="infra"}Whether an infrastructure scrape endpoint is reachable
agent_upup{job!~"infra|node|etcd|minio|pgsql|redis|mysql"}Reachability of targets outside the excluded jobs

infra_up and agent_up are recording rules, absent from components’ raw /metrics output. The exclusion list above defines the scope of agent_up: it does not exclude jobs such as kafka, ping, or pgrds, and does not cover exporters already in node or pgsql. up=1 indicates only successful scraping. Assess functional service health with nginx_up, probe results, or component metrics.

The InfraDown and AgentDown alerts fire when their respective metrics stay below 1 for one minute. Both use severity CRIT. See Monitoring and Alerting for the rules.

Shared Liveness Recording Rules

In addition to module rules, roles/infra/templates/victoria/agent.yml generates 14 shared liveness rules, deployed to /infra/rules/agent.yml. The table retains template expressions; configuration variables render the ports. All derive from collector-generated up and indicate scrape success, not necessarily successful database queries, quorum, or application requests.

Recorded MetricTemplate Expression
node_upup{instance=~".*:{{ node_exporter_port|default('9100') }}"}
haproxy_upup{instance=~".*:{{ haproxy_exporter_port|default('9101') }}"}
keepalived_exporter_upup{instance=~".*:{{ vip_exporter_port|default('9650') }}"}
docker_upup{instance=~".*:{{ docker_exporter_port|default('9323') }}"}
vector_upup{instance=~".*:{{ vector_port|default('9598') }}"}
etcd_upup{job="etcd"}
minio_upup{job="minio"}
pg_exporter_agent_upup{instance=~".*:{{ pg_exporter_port|default('9630') }}"}
pgbouncer_exporter_agent_upup{instance=~".*:{{ pgbouncer_exporter_port|default('9631') }}"}
pgbackrest_exporter_agent_upup{instance=~".*:{{ pgbackrest_exporter_port|default('9854') }}"}
patroni_upup{instance=~".*:{{ patroni_port|default('8008') }}"}
mysql_exporter_upup{job="mysql"}
kafka_upup{job="kafka",role=~".+"}
kafka_exporter_upup{job="kafka",role=""}

These recorded metrics are also absent from raw /metrics endpoints. Rules matching ports do not restrict job, so port overrides must remain consistent between the Infra rule template and service configuration.

Key Dashboard Metrics

The following names come from queries in the current files/grafana/infra dashboards and provide troubleshooting entry points. Availability depends on the installed version’s /metrics output.

ComponentKey MetricsPurpose
Common process metricsprocess_cpu_seconds_total, process_resident_memory_bytes, process_start_time_secondsProcess resources and start time
Victoria componentsvm_app_version, vm_app_uptime_secondsVersion and uptime
VictoriaMetricsvm_rows_inserted_total, vm_rows, vm_data_size_bytes, vm_new_timeseries_created_totalIngestion, storage, and new series
VictoriaLogsvl_rows_ingested_total, vl_bytes_ingested_total, vl_data_size_bytes, vl_http_requests_totalLog ingestion, capacity, and requests
VictoriaTracesvt_rows_ingested_total, vt_bytes_ingested_total, vt_storage_rows, vt_data_size_bytesTrace ingestion and storage
VMAlertvmalert_alerts_firing, vmalert_alerts_pending, vmalert_recording_rules_last_evaluation_samples, vmalert_alerting_rules_errors_totalAlert state and rule evaluation
Alertmanageralertmanager_alerts, alertmanager_silences, alertmanager_notifications_total, alertmanager_notifications_failed_totalAlert aggregation, silences, and notifications
Grafanagrafana_build_info, grafana_http_request_duration_seconds_count, grafana_stat_active_sessionsVersion, HTTP requests, and sessions
Nginxnginx_up, nginx_http_requests_total, nginx_connections_active, nginx_connections_waitingNginx status, traffic, and connections

These are raw metric names. Counters usually require rate() / increase() before analysis. Histogram / Summary _bucket, _sum, and _count are samples of one metric family, not unrelated families counted by row.

Get the Actual Metric List

Run these queries in VictoriaMetrics VMUI (default http://<infra-ip>:8428/vmui) or Grafana Explore:

up{job="infra"}
count by (cls) (up{job="infra"})
count by (__name__) ({job="infra"})

The first query checks each target’s scrape status, the second counts registered component endpoints, and the third lists visible series counts by metric name at the query time. To count distinct metric names, use count(count by (__name__) ({job="infra"})). This is still not an exporter metric-family count and cannot be added directly to other module counts.

Read raw types, HELP text, and labels from the target endpoint, for example:

curl -fsS http://127.0.0.1:8428/metrics
curl -fsS http://127.0.0.1:9428/metrics
curl -fsS http://127.0.0.1:8880/metrics

Was this page helpful?