Host agents: monitoring locked-down hosts

The host probes and the SNMP, SSH and WinRM monitors all connect to the host. In a locked-down zone that is exactly what the firewall forbids, and the security team does not want a login for a monitoring system on every machine. What such a zone usually allows is one outbound connection to a collector.

A host agent is that outbound path. A standard collector that your company already trusts (the OpenTelemetry Collector or Telegraf) runs on the host and pushes its readings to Netlens over HTTPS, proving who it is with a client certificate. Netlens only listens and answers. It never sends a command, a setting or an update to a host, and it holds no login for it.

When to use which way of monitoring

Host probes / SSH / WinRM / SNMP Host agent (this page)
Direction Netlens connects to the host the host connects to Netlens
Needs on the host an open port (22, 5986, 161) and a login or community an outbound rule to Netlens and a collector
Stored on Netlens a login or key per host (encrypted) nothing that can log in anywhere: only a CA and per-host certificate fingerprints
What you get the full picture: the nine read-only probes (storage, SMART, RAID, services, logins, updates, ports …) the numbers: processor, memory, swap, disks, network traffic, load, uptime, with the same limits, alerts, graphs and AI as any other monitored host
Good for hosts you may log in to locked-down hosts, DMZs, regulated zones, hosts the security team will not give a login

If the company already runs Prometheus (or VictoriaMetrics, Mimir, Thanos), you may not need an agent at all: the Prometheus (host metrics) plugin reads the readings of the hosts that node_exporter and windows_exporter already report, with no new listener in Netlens and nothing installed on the hosts (see plugins/prometheus). The host agents on this page are for hosts with no such stack.

The two are not mixed on one device: a device is monitored one way. Link a device to an agent and remove its other monitor first (Netlens refuses otherwise, and says so).

How it works

 locked-down host                                   Netlens
 ┌──────────────────────┐   HTTPS, client cert    ┌─────────────────────────────┐
 │ collector            │ ─────────────────────▶  │ :4318  readings (mTLS only) │
 │ (OTel Collector or   │   POST /v1/metrics      │ :4319  enrolment (window)   │
 │  Telegraf)           │   POST /telegraf        └─────────────────────────────┘
 └──────────────────────┘
        nothing flows the other way: no command, no setting, no update
  1. In Netlens you add an agent and link it to the device it reports for. You get a one-time token.
  2. On the host you make a key pair (the private key never leaves the host), and send a certificate request with the token to the enrolment port, which is open only during an enrolment window you start. Netlens answers with a certificate (valid 30 days).
  3. The collector connects to the readings port with that certificate. A connection without a valid certificate ends in the TLS handshake, before any request is read.
  4. Netlens turns the readings into the ones it already knows (processor, memory, disk …) and handles them like any other monitor: graphs, limits, alerts, the dashboard, reports, Ask, the assistant and MCP.
  5. If the host stops sending, Netlens says so (agent silent). If the certificate is about to end, Netlens says so too.

In this section

The files HOST-AGENTS.md, contrib/netlens-push.sh, contrib/netlens-renew.sh and contrib/netlens-renew.ps1 are in the Netlens repository. Host agents are part of the Enterprise edition and the free trial.