Host metrics for VMs and servers with the OpenTelemetry Collector

Collect CPU, memory, disk, filesystem, network and process metrics from Linux and Windows hosts with the hostmetrics receiver, and check the per-OS differences before you rely on the data.

On this page

How host metrics with the OpenTelemetry Collector work for VMs and servers

Most organizations running a mixed fleet of virtual machines and physical servers end up with host health reported by several agents, each with its own configuration, naming and retention. The hostmetrics receiver in the OpenTelemetry Collector standardizes that telemetry: one receiver, one configuration pattern and one set of metric names across Linux and Windows hosts. OpenTelemetry is a vendor-neutral framework for generating, exporting and collecting telemetry, and it is not an observability backend, so the Collector ships host metrics to whatever storage and dashboards you already run or plan to run. In the usual layout, a Collector runs as an agent on each host, reads local CPU, memory, disk, filesystem, network and process data, and forwards it onward. The receiver's metrics are still beta, so confirm the stability level of each metric you depend on in the component's README before you build alerts on it.

The receiver is organized into scrapers, and each scraper covers one metric family: cpu, memory, disk, filesystem, network and process. Teams usually need this when they run VMs or bare-metal servers outside Kubernetes, when hypervisor or guest-level signals are needed alongside application traces, or when they are replacing several host agents with one. You control the collection interval, the root path used to read host data (important when the Collector runs in a container that mounts the host filesystem), and which scrapers and individual metrics are enabled. Expect the set of available metrics to differ by operating system, so a Linux dashboard may not translate directly to a Windows host. Before rollout, list the metrics each alert and dashboard needs, then check each one against the target operating systems in the README. Process metrics deserve particular attention because they can add high cardinality on hosts running many short-lived processes.

Hostmetrics configuration options and when each fits

This table compares the main hostmetrics receiver settings and deployment choices, with the situations where each fits and what it costs in volume, sensitivity or accuracy. Read each row as a decision: pick the option that matches where the Collector runs and what the team needs to see, then confirm the trade-off against your own environment.

OptionWhen it fitsTrade-off to check
collection_intervalStandard host health dashboards and alerting where a coarse view of CPU, memory and disk trends is enoughShorter intervals raise data volume and back-end cost in proportion to the number of hosts and enabled metrics, so set it per signal where possible
root_pathAgent runs in a container and must read host metrics from the mounted host filesystem, for example a host path mounted under a container directoryWrong or missing mounts produce empty or misleading filesystem and process values without an obvious error, so verify each scraper output after deployment
cpu, memory and load scrapersBaseline capacity and saturation views on every Linux and Windows hostLow cost and broadly supported, but confirm per-metric OS support in the receiver README before relying on a metric name across both operating systems
disk and filesystem scrapersCapacity planning, full-disk alerts and I/O investigation on hosts with local storageFilesystem scraping can report many mount points, including ephemeral or pseudo filesystems, which adds series; use include and exclude filters to limit them
network scraperInterface throughput and error counters for network-sensitive services such as gateways and database hostsInterface counts vary between VMs and hypervisor-attached NICs, so confirm which interfaces report and filter virtual or loopback devices
process scraperInvestigating a specific runaway process or confirming a service is running on a host with a small, known set of processesProcess metrics can be high cardinality and may expose command lines or user names, so restrict names and review data sensitivity before enabling
Per-metric enable flagsTurning off metrics the team does not use to cut volume and remove fields that are not supported on one operating systemEach disabled metric is a gap in dashboards built later, so record which metrics are off and why in the configuration repository
Agent on the hostBare-metal and VM hosts where the Collector runs as a service with direct access to host metrics and the correct process viewRequires host-level installation, package updates and service management on every machine
Agent in a containerFleets managed as containers or orchestrated workloads where host paths can be mounted read-onlyNeeds careful host mounts, privilege settings and a review of what the container can read, and metrics depend on the mount being correct

Setting up host metrics collection step by step

This sequence takes a host metrics collection from a pinned Collector release on one test VM to a reviewed, version-controlled rollout across your fleet. Each step ends with a check so the team knows the data is correct before it moves on.

  1. Choose the distribution and pin the release

    The platform engineer selects the Collector distribution and a specific version from the official OpenTelemetry Collector releases page, then records that version in the change request. The contrib distribution is the one that includes the hostmetrics receiver, so confirm that the chosen artifact contains it. Verify the download against the published SHA256 checksum and review the SBOM before anything is installed. Done when the team has a pinned version, a verified artifact and a written reason for the choice.

  2. Install the Collector on a test VM

    Install the pinned binary on one non-production Linux or Windows VM, running it as a dedicated service account rather than as root or Administrator where the platform allows. Confirm that the service starts and that its listening endpoints bind to localhost, as the security guidance describes for recent releases. Done when the service runs under the intended account and the process list shows no unexpected open ports.

  3. Write a minimal hostmetrics config with one scraper

    Create a configuration with a single hostmetrics scraper, such as cpu, and a collection interval your team has agreed on. Set the root path only if the Collector runs in a container or chroot that needs it, and check the receiver README for the scraper and metric names in your release. Route the output to the debug exporter so nothing leaves the test host. Done when the debug exporter prints CPU metric names and attributes that match the documentation for that version.

  4. Add the remaining scrapers one at a time

    Add memory, disk, filesystem, network and process scrapers in small steps, restarting the Collector after each addition. Enable only the metrics your dashboards and alerts need, because some metrics have different support per operating system and disabling unused ones reduces noise. Check the debug output after each change for errors about unsupported metrics on that OS. Done when every planned scraper reports data on the test VM and the logs show no scraper errors.

  5. Confirm process metrics and their scope

    Enable the process scraper and review which users and processes appear in the debug output, since process metrics can expose command lines and owner names. Check that only the expected service accounts and processes show up, and adjust include or exclude filters if other users appear. Confirm that sensitive attributes are removed with the redaction processor if command arguments carry secrets. Done when a reviewer signs off that the process data matches the expected scope.

  6. Route output to a test exporter

    Replace the debug exporter with the exporter your test backend uses, and send data over an encrypted, authenticated connection. Confirm that the metrics arrive with the same names, units and resource attributes seen in the debug output, and that the host identifiers are consistent. Done when the test backend shows the expected host series and the Collector reports no export failures over a sustained run.

  7. Roll out with configuration in version control

    Store the approved configuration, the pinned version and the deployment definitions in version control, and deploy them to a small group of production hosts through your normal change process. Review each host group for unexpected scraper errors and resource use before widening the rollout. Done when the configuration is reproducible from the repository, every host reports through the same reviewed pipeline, and the team has a documented rollback to the previous version.

Linux and Windows differences to check before rollout

Linux and Windows hosts do not expose the same data to the hostmetrics receiver, so a rollout that works on one platform can leave gaps on the other. The receiver's README states that individual metrics may have different operating system support, and that is the starting assumption for every host group you plan to cover. Do not assume that a metric name in a dashboard template exists on both platforms. Build an inventory of the scrapers and metrics you enable, then confirm each one against the README and a running Collector on a Linux host and a Windows host in staging. Record which metrics return data, which return nothing, and which return values that look wrong for the OS.

Windows process and disk data depend heavily on the account the Collector runs under. In a staging run, start the Collector as the same service account you plan to use in production, then compare process and disk output against Task Manager or Resource Monitor. If process names, command lines or owners are missing, check whether the service account can read other users' processes and whether the disk scraper sees the volumes you expect. Keep the service account least privileged, and document any extra rights you grant so a security reviewer can see why they exist. Linux has its own equivalent checks, such as the root_path setting for containerized or chrooted hosts and the permissions on /proc entries the process scraper reads.

Document every gap in a short support matrix that lists the OS, the scraper, the metric, whether it is present, and the reason if it is absent. Share the matrix with dashboard owners before they build panels, and mark panels that depend on a missing metric so they show no data as a known condition rather than a fault. Ask the Collector and dashboard owners to rerun the staging check after each Collector upgrade, because support for individual metrics can change between releases. Record the Collector version and the verification date in the matrix so the next reviewer can tell which findings are current.

How host metrics flow from VMs to your back end

The flow starts on each Linux or Windows host, where a Collector running the hostmetrics receiver reads CPU, memory, disk, filesystem, network and process data on a configured interval. Processors then shape the data before the exporter sends it to a self-hosted metrics back end inside your network. Check the trust boundary: the Collector and back end should stay within your controlled network, and each host's scrapers should match what its operating system actually supports, since individual metrics vary by platform.

Host metrics flow from each host's Collector to a back end inside the client network.

Security and operational considerations for host metrics agents

A host metrics agent runs with access to every server it measures, so its configuration, credentials, transport and build deserve the same scrutiny as the workloads it watches. The six cards below cover the decisions that most often leave a Collector on a VM or server more exposed than intended, and the checks that show whether it is still healthy.

Restrict the configuration file and secrets

The Collector configuration names endpoints, tenants and sometimes credentials, so it should be readable only by the account that runs the service and by the people who maintain it. Keep tokens and passwords out of the file itself by referencing environment variables or a secrets store, and check file permissions on every host after provisioning. Confirm that configuration changes go through version control and review, so a silent edit cannot change what a host sends or where.

Collector security practices

Least-privilege service accounts

On Linux, run the Collector as a dedicated system user rather than root, and grant only the read access that the enabled scrapers need, such as the process and filesystem views they query. On Windows, use a dedicated service account with the minimum performance counter and service permissions required, instead of a domain administrator. Test each scraper under that account, because metrics that silently return empty values often trace back to permissions rather than configuration.

Bind and authenticate exporter traffic

Host metrics leave the server over the network, so decide which interfaces and ports the Collector listens on and who may connect to them. Since v0.110.0, server components bind to localhost by default, so any change to listen on a wider address is a deliberate decision to review. Use authenticator extensions such as the OIDC server authenticator for incoming connections and the oauth2client extension for outgoing requests, and confirm that exporters validate the destination's TLS certificate.

Collector configuration docs

Redact process command lines

The process scraper can capture full command lines, and those often contain database passwords, API keys or tokens passed as arguments. Before enabling process metrics, decide which attributes you actually need and remove or mask the rest with the redaction processor. Review a sample of exported data in a non-production pipeline to confirm that the redaction rules match the patterns your teams use in their commands.

Build the Collector with only needed components

Host metrics needs the hostmetrics receiver, a few processors and one exporter, but the contrib distribution includes many more components. Use the Collector Builder to produce a binary with only the components your configuration references, and pin the versions you build against. Keep the build in CI with signed artifacts and an SBOM, so you can show which components run on each host and remove the ones nobody uses.

Monitor the agent for restarts and drops

A host metrics agent that stops or silently drops data creates gaps that look like healthy hosts. Alert on Collector restarts, on refused or dropped data reported by the Collector's own telemetry, and on scrapers that stop producing data for a host. Test these alerts by stopping the service on a non-production host and confirming that the alert fires within the window your operations team expects.

Questions teams ask before rolling out host metrics

What drives the effort of a host metrics rollout?

The effort is driven mostly by fleet size, the operating system mix, the permissions the Collector needs on each host, and how many dashboards and alerts must be rebuilt. A fleet of identical Linux VMs managed by one configuration tool is far simpler than a mixed estate of Linux and Windows servers across several networks. Each distinct OS and distribution adds a review of which metrics the hostmetrics receiver supports there, because the receiver notes that individual metrics may have different operating system support. Ask the partner to show how they will count hosts by OS and by permission model before agreeing on a quote.

Can our team set up host metrics collection on its own?

Often yes, if you have engineers who already manage Linux or Windows servers, a configuration management tool, and someone who owns the telemetry backend. The hostmetrics receiver is configured in the Collector YAML, so the core task is writing a configuration that enables the right scrapers and metrics, then deploying it safely. Teams usually struggle with the parts around the receiver: deciding which metrics to keep, agreeing on naming and resource attributes, setting up service accounts with the right read access, and rolling changes out without breaking alerts. An external partner is most useful for those decisions and for a reviewed, repeatable rollout.

What do we need to provide for a host metrics engagement?

You need to provide access to representative hosts in each OS group, a non-production environment for testing, a chosen metrics backend and its endpoint, and a named owner who can approve the metric list and alert changes. Your security team should also confirm how Collector configuration is stored and which credentials the Collector can use. Ask the partner for a written list of required access before the work starts, so that account creation and change approvals can be scheduled in advance.

How long does a host metrics pilot usually take?

The duration depends on scope: the number of OS types, how many hosts are in the pilot, whether a backend is already running, and how many dashboards must be recreated. A pilot limited to one Linux group with an existing backend is a much smaller job than one that covers Linux and Windows servers, several network zones and new dashboards. No duration figure is given here, so ask for a timeline tied to the written scope, with each milestone listed separately, including the review and approval steps your organization requires.

Does the hostmetrics receiver replace our existing host agent?

It can, but only for the metrics you choose to move. The hostmetrics receiver covers CPU, memory, disk, filesystem, network and process data, so it may take over part of what an existing agent does. Before retiring the old agent, compare metric names, units, collection intervals and label sets, because dashboards and alerts that depend on the old names will break. Many teams run both agents in parallel for a short overlap period so they can verify values match. Confirm the exact metric coverage you need against the receiver documentation for each OS, since support differs by metric.

How are Collector and receiver upgrades handled after go-live?

Upgrades are a recurring task, not a one-time event. The OpenTelemetry Collector publishes releases with contrib builds, checksums and SBOM files, so you can verify what you deploy, and each release can change component behavior. The hostmetrics receiver is beta for metrics, so review its release notes before each upgrade and test the new version on a pilot group first. Ask any partner whether upgrades, configuration changes and metric review are included in a retainer, what the test process is, and who approves rollout to production hosts.

Is host metrics collection a security risk, and how do we limit it?

The risk is mostly about access and configuration, not the metrics themselves. The Collector needs read access to system statistics, and process metrics can reveal process names and command details, so limit the scrapers and metrics you enable and review which attributes leave the host. Store Collector configuration securely, avoid binding listeners more widely than needed, and use only the components your build requires. Your security team should review the planned permissions and data flow before deployment, and any partner should document how they handle credentials during the work.

When a partner helps with host metrics rollout

An outside team adds the most value when the host metrics rollout involves more than one variable at once. The usual cases are a mixed Linux and Windows fleet, where the same hostmetrics configuration cannot be copied across hosts without checking each OS, a migration away from an existing agent such as a legacy monitoring daemon, a compliance requirement that limits which process attributes, user names or network details may leave the host, or a fleet large enough that collection interval and Collector sizing need to be modeled before rollout. In each case the risk is not the receiver itself but the combination of decisions around it, and a partner can run those decisions in a fixed order with evidence at each step. If your team already runs Collectors at this scale and has tested the scrapers on every OS in your fleet, you may not need that help.

The engagement is fixed-scope. Before work starts, the scope, the deliverables and the timeline are agreed in writing. For this topic, a typical written scope lists the operating systems and versions in the fleet, the scrapers and metrics to be enabled and excluded, the agent or gateway topology, the destination back end, the data handling rules that apply to process and filesystem labels, and the verification steps used to confirm each host reports what the scope says. Deliverables are the configuration as code, the per-OS test results, runbook notes for restarts and upgrades, and a retest after changes. Ongoing support, upgrades and continuous checks can be added as a retainer, so the rollout does not end with a configuration nobody maintains.

DeployOpen does not publish a price list. A quote follows from the written scope, so the inputs that move cost are the number and variety of operating systems, the number of hosts and sites, how many existing agents must be replaced, the compliance evidence your assessors expect, and whether the back end is already in place. Ask each bidder to price these items separately: planning and scope, configuration and testing per OS, migration of existing dashboards and alerts, and any recurring support. Ask also what is one-time and what recurs, and how changes to scope after signing are priced. Confirm with your own security and operations teams which metrics you are required to keep before you request a quote, because removing them later changes the test matrix.

How DeployOpen scopes, delivers and supports host metrics

DeployOpen plans host metrics collection as a fixed-scope piece of work inside your infrastructure, starting with the hosts, operating systems and metric sets you need. We build the hostmetrics receiver configuration, test it on representative Linux and Windows hosts, and hand over documented pipelines your own team can run.

How we scope

  • Inventory the Linux and Windows VMs and servers that need CPU, memory, disk, filesystem, network and process metrics.
  • Record which scrapers, collection intervals and root path settings each host group needs, and which metrics are required.
  • Confirm per-OS metric support for each planned metric before the build, since support differs between operating systems.
  • Agree deliverables, timelines and acceptance tests in writing before work starts, since engagements are fixed-scope.

How we build

  • Write hostmetrics receiver configuration for each host group, with interval and scraper choices tied to the agreed scope.
  • Deploy Collector builds from the distribution you approve, and pin versions so upgrades are deliberate.
  • Test metric names, units and resource attributes against your dashboards and alert rules on representative hosts.
  • Check Collector resource use on hosts that run production workloads, and record the results alongside the configuration.

How we hand over

  • Deliver the configuration files, deployment steps and a per-OS table of which metrics were verified and which are not supported.
  • Document the known limitations of the beta metrics support so your team knows what to expect before relying on each metric.
  • Walk your platform and operations engineers through how to add a host group, change an interval and read the Collector's own health signals.

How we support

  • Ongoing support, upgrades and continuous testing are available as retainers, covering Collector version changes and new host groups.
  • Review the hostmetrics configuration when the Collector or operating system versions change, and retest affected metrics.
  • Confirm with your team who owns the Collector fleet, the upgrade approvals and the escalation path before the handover closes.

Sources and further reading

Talk to our team.

Tell us what you're working on, whether it's a deployment, an audit, a security test or a cyber range. You'll speak with an engineer who can help you scope it.

  • 30-minute call: free, with no obligation.
  • NDA on request: we can sign before you share details.
  • Clear next steps: a scope and plan after the call.