Skip to content

Infrastructure

See servers, containers and Kubernetes pods on a host map and drill into CPU, memory and disk with a one-file agent or an OpenTelemetry Collector.

What you get

Infrastructure views
ViewWhat you see
Pods & CPU (on an application)How many copies of your application report right now: servers, containers or Kubernetes pods. Shows instances running, CPU used against available cores, CPU over time and a per-instance breakdown, plus a guided setup and a Create alert button.
Host mapEvery reporting host, container and pod as a hexagon coloured by CPU, memory or disk, with a table below listing each host and whether it is reporting. Click a tile for the host detail page.
Host detailCPU, memory and disk over the selected range, the Kubernetes cluster, namespace, workload and node when known, and a top-processes table (processes need an OpenTelemetry Collector).
KubernetesCluster, namespace, workload and pod hierarchy with CPU and memory against limits, restart counts and reporting status.
Runtime metricsAPM runtime metrics for your services (a tab in the Infrastructure section).

There is no network view: the agent and the host views report CPU, memory and disk only, not network traffic.

How it works

Your application runs on your own servers, so VitalRix cannot see inside them by itself. A single small file, the infrastructure agent, runs next to your application and reports CPU, memory and disk usage every 10 seconds by default.

  • It sends only CPU, memory and root-disk numbers (plus pod labels in Kubernetes), labelled with your application, environment and instance name. No code, logs, files or environment variables.
  • It needs a key that can only write metrics, so a leaked key can do nothing else.
  • If VitalRix cannot be reached, it keeps retrying quietly. It never stops or slows your application.
  • It needs Node.js 18 or newer on the machine or in the image.

Set it up

Server or VM
curl -O https://monitor.vitalrix.com/agent/infra-agent.mjs

PLATFORM_URL=https://api.vitalrix.com \
PLATFORM_API_KEY=pk_your_key \
APP_NAME=my-shop \
ENVIRONMENT=production \
node infra-agent.mjs
  1. Server or VM

    Keep the agent running with systemd, pm2 or nohup. Run one agent per machine: it reports the whole machine.

  2. Docker

    Pass PLATFORM_URL, PLATFORM_API_KEY, APP_NAME and ENVIRONMENT as environment variables. If your image has no Node.js, run the agent on the host instead.

  3. Kubernetes

    Create the secret once, then start the agent inside your application container, as in the Docker example:

    Create the secret
    kubectl create secret generic vitalrix-agent --from-literal=api-key=pk_your_key

Settings

Agent settings
VariableRequiredMeaning
PLATFORM_URLYesThe VitalRix API address: https://api.vitalrix.com
PLATFORM_API_KEYYesA key that can write metrics.
APP_NAMEYesYour application’s slug, shown on its page.
ENVIRONMENTNoproduction (default), staging, development…
INSTANCENoA name for this instance. Default: the host name (the pod name in Kubernetes).
INTERVAL_SECONDSNoHow often to report, 5 to 300. Default 10.

Host map

The Infrastructure page opens on the Host map. Summary cards show hosts reporting, average CPU, average memory and the fullest disk. Below them, every host that reported in the selected time range is a hexagon.

Host map options
OptionChoices
Colour byCPU, Memory or Disk, in five 20-point steps from 0 to 100%.
Group byNo grouping, Application, Environment or Kubernetes cluster.
ScopeThe application and environment chosen in the app header, and the header time range, narrow which hosts appear.

Hover or focus a tile for its CPU, memory and disk. A grey dashed tile stopped reporting; an empty outline never reported that metric. Click a tile to open the host page, which charts utilization, shows its Kubernetes placement and lists top processes. Process data comes only from an OpenTelemetry Collector with the hostmetrics process scraper; the VitalRix agent reports the whole machine or container. Use Add hosts to see setup instructions, including a Collector configuration.

Kubernetes

The Infrastructure › Kubernetes tab groups reporting pods by cluster, then namespace, then workload. Expand a workload to see its pods.

  • Each level shows pods reporting out of total, CPU and memory in use against the container limits, and restarts.
  • Each pod row shows its node, CPU, memory, restarts and a Reporting or Not reporting badge. Click a pod to open its host page.
  • Restarts come from Kubernetes itself when an OpenTelemetry Collector's k8s_cluster receiver reports them; otherwise they are counted from how many times the VitalRix agent started again in that pod during the range.
  • Pod counts follow your autoscaler: pods that stop reporting show as Not reporting.

Alerts on CPU and memory

On the Pods & CPU tab, choose Create alert, pick “CPU is too high” or “Memory is too high”, and set a threshold (percent for CPU, MB for memory), a duration of 1 to 60 minutes (for example above 80% for 5 minutes), a severity and notification channels. The alert covers only this application, is evaluated per instance so one hot pod alerts even when the others are idle, repeats every hour while the problem lasts, and resolves by itself.

For cluster-wide alerts, create a metric alert rule on infra.cpu_utilization_percent or infra.memory_mb with a label filter for your application or environment.

With an AI agent

An AI agent connected through MCP can add the infra agent for a server, a Docker image or Kubernetes pods to your project (the get_instrumentation tool) and set up CPU, memory and pod alerts from a previewed setup file. The agent's key is never handled by the AI: the code reads it from the VITALRIX_API_KEY environment variable, and you create that key yourself with metric.write.

Troubleshooting

Agent problems
ProblemFix
The tab still says nothing is reportingRun the agent in a terminal first. It prints one line when it starts, and a clear message if something is wrong.
The agent says 401 or 403The key is wrong, revoked or cannot write metrics. Create a new one from the tab.
It cannot reach VitalRixCheck PLATFORM_URL and that outbound HTTPS is allowed. Open https://api.vitalrix.com/api/v1/health/ready from that machine.
Numbers look like the whole machineNo CPU limit is set on the container. Set one for per-container numbers.
CPU is 0% on a busy appThe agent runs in a sidecar and measures only itself. Start it inside the application container.

Something unclear or missing? Open VitalRix and use the in-app setup guides, or read Troubleshooting.