Browse docs
On this page

Host metrics

Three ways to send CPU, memory, disk, load, uptime and network metrics for a server over OpenTelemetry, from a one-command agent to a Collector you already run.

Host metrics arrive over OpenTelemetry (OTLP), the same protocol used for logs and traces. Every option below sends to the same endpoint, https://api.obistack.com/ingest/otel/v1/metrics, authenticated with Authorization: Bearer <ingest key>. Pick whichever fits the host; all three show up on the same Hosts screen.

Choose a setup

  • OS metrics agent - zero dependencies beyond Bash and curl, works on any Linux or macOS host, nothing else to run. Pick this for a server you do not already point a Collector at.
  • OpenTelemetry Collector, one command - a single install that can also ship this host's logs and traces once it is running. Pick this on Linux when you want one agent doing more than metrics. Not available for macOS yet.
  • A Collector you already run - add a receiver block to its existing config. Pick this when the host is already scraped by a Collector of your own, such as a Kubernetes DaemonSet.

Option 1: OS metrics agent

A small Bash script that reports CPU, memory, disk, load average, uptime and network I/O once a minute, with no Python or Node.js required on the host.

Shell
curl -sSL "https://api.obistack.com/v1/metrics/os-metrics-agent.sh" | bash -s -- \
  --api-key <ingest key> --platform https://api.obistack.com

Run it as root or as a normal user - it uses sudo automatically when it needs to. It installs itself as a systemd unit (Linux) or a launchd job (macOS) so it survives a reboot, falling back to a crontab entry once a minute on anything with neither. The command is idempotent: running it again on a host that already has the agent updates the config in place rather than installing a second copy. Add --interval 30 to report more often than once a minute; this only takes effect with the systemd or launchd install, not the cron fallback.

Network I/O is not collected by the agent on macOS.

Uninstalling the agent

Shell
curl -sSL "https://api.obistack.com/v1/metrics/os-metrics-agent.sh" | sudo bash -s -- --uninstall

Use sudo bash to uninstall a root-level install, and plain bash (no sudo) to uninstall a user-level one - matching however the agent was installed. Uninstalling sends one last OTLP log record before it stops, so the host shows as Uninstalled on the Hosts screen rather than quietly going Stale.

Option 2: OpenTelemetry Collector, one command

A single install of the official otelcol-contrib Collector, pinned to a known version, configured to scrape this host and send the result to us. Available for Debian/Ubuntu (.deb) and RHEL/Fedora/SUSE (.rpm), on amd64 or arm64. Linux only for now - use the agent above on macOS.

Shell
curl -sSL "https://api.obistack.com/v1/hosts/otelcol-setup.sh" | sudo bash -s -- \
  --api-key <ingest key> --platform https://api.obistack.com

This installs the otelcol-contrib package at a pinned version (0.115.1), writes /etc/otelcol-contrib/config.yaml (root-only, mode 600), and enables and restarts the otelcol-contrib systemd service. Because it is a real Collector, the same install can also ship this host's logs and traces: add the pipelines you want to its config afterward.

Uninstalling the Collector

Shell
curl -sSL "https://api.obistack.com/v1/hosts/otelcol-setup.sh" | sudo bash -s -- --uninstall

This stops the service, removes the otelcol-contrib package, and removes the config file.

Option 3: a Collector you already run

Add a hostmetrics receiver and a metrics pipeline to your existing Collector's config. Use otlphttp, not otlp - only OTLP over HTTP is accepted here, not gRPC. The exporter endpoint is the base path; the Collector appends /v1/metrics itself.

YAML
receivers:
  hostmetrics:
    collection_interval: 60s
    scrapers:
      cpu:
        metrics:
          system.cpu.utilization:
            enabled: true
      memory:
        metrics:
          system.memory.utilization:
            enabled: true
      filesystem:
        metrics:
          system.filesystem.utilization:
            enabled: true
        exclude_fs_types:
          fs_types: [autofs, binfmt_misc, bpf, cgroup, cgroup2, configfs, debugfs, devpts, devtmpfs, efivarfs, fusectl, hugetlbfs, mqueue, nsfs, overlay, proc, pstore, ramfs, rpc_pipefs, securityfs, selinuxfs, squashfs, sysfs, tmpfs, tracefs]
          match_type: strict
        exclude_mount_points:
          mount_points: ["^/(dev|proc|sys|run|snap)/", "^/var/lib/(docker|containers|kubelet)/"]
          match_type: regexp
      network:
      load:
      system:
processors:
  resourcedetection:
    detectors: [system]
  batch:
exporters:
  otlphttp/obistack:
    endpoint: https://api.obistack.com/ingest/otel
    headers:
      Authorization: "Bearer <ingest key>"
service:
  pipelines:
    metrics/hosts:
      receivers: [hostmetrics]
      processors: [resourcedetection, batch]
      exporters: [otlphttp/obistack]

The exporter and pipeline are named otlphttp/obistack and metrics/hosts so they do not clash with anything you already have. If this Collector already has an otlphttp exporter pointed at us for logs or traces, you can reuse that exporter instead and only add the hostmetrics receiver, the two processors, and the metrics/hosts pipeline above.

Automatic host discovery

There is no registration step. A host appears on the Hosts screen the first time it sends an OTLP resource that has a host.name attribute and at least one host metric from the table below. host.name alone is not enough: application SDKs and Collectors set that attribute too, and without the second condition every service or container reporting metrics would become a host of its own.

A host's identity comes from three things together: the workspace, the ingest key that sent the data, and the reported host.name. The same hostname reporting under two different ingest keys is treated as two separate hosts, unless they are linked together from that host's Settings.

Besides host.name, these resource attributes are used when present: host.id, os.type, host.arch, and os.description. The resourcedetection processor fills these in automatically for options 2 and 3; the agent in option 1 sets them itself.

With the Hosts add-on off

Host metrics are still ingested and searchable in the Explorer even while the Hosts add-on is off; only the Hosts pages and the Hosts API are hidden. Turning the add-on on shows every host that has ever reported, along with its history, without re-sending anything.

What's collected, and how to search it

MetricTypeUnitShown on Hosts as
system.cpu.utilization (by state, cpu)gaugeratio, 0 to 1CPU %: one minus the average idle ratio across CPUs
system.memory.utilization (by state) or system.memory.usage (by state)gauge or sumratio or bytesMemory %: the used state, computed from usage (used divided by all states) when utilization is not sent
system.filesystem.utilization (by mountpoint) or system.filesystem.usage (by mountpoint, state)gauge or sumratio or bytesDisk %: the root filesystem / only; other mount points are still stored and searchable
system.network.io (by direction, device)cumulative sumbytesNetwork I/O, shown as bytes per second, summed across non-loopback interfaces
system.cpu.load_average.1m / .5m / .15mgauge-Load average
system.uptimegaugesecondsUptime

Every data point is one searchable event, with metric.name, metric.value, and its attributes as fields; a host's own rows also carry host_id and hostname. Useful searches in the Explorer:

metric.name=system.cpu.utilization
metric.name=system.cpu.utilization state=idle host_id=<id>
metric.name=system.filesystem.utilization mountpoint="/"
metric.name=system.cpu.load_average.1m | timechart avg(metric.value) by hostname

Reporting and stale

The Hosts list shows each host's own status:

  • Reporting - a metric has arrived within the last 5 minutes by default (configurable).
  • Stale - nothing has arrived within that window, or nothing ever has. This is the whole health signal: there is no CPU/memory/disk threshold that marks a host unhealthy on its own, because a host idling at 90% memory by design is not an incident and this platform has no way to know your host's normal. Point a Liveness Check or an alert rule at these numbers if you want a threshold to page on.
  • Uninstalled - the agent's --uninstall sent its last-gasp record before stopping.
  • Disabled - the ingest key that was sending this host's metrics has been disabled.
  • No metrics - the host exists (for example, from a security scan) but no host metric has ever been reported for it.

A host commonly goes stale because its agent or Collector stopped, the host was decommissioned, or a firewall change blocked outbound access to the platform - not necessarily because anything on the host itself is wrong.

Tenant Isolation & Data Boundaries

Every option above authenticates with an ingest key, and the workspace a report lands in comes from that key alone - nothing in the OTLP payload can name a different one. A host's identity is derived from the workspace, the key, and the reported host.name, so the same hostname used by two different customers - or by two different keys in the same workspace - never collides into one row unless you link them yourself. See Tenant Isolation for the full model.