Host agents: gateways, containers and Kubernetes

Gateways: one collector for many hosts

A central collector (or Prometheus-style gateway) can forward for many hosts, so the individual hosts need no route to Netlens at all. Give the gateway one agent that is linked to several devices, and for each device the host name the data carries (the OpenTelemetry resource attribute host.name, or the host tag of Telegraf):

  • add the agent, tick several devices, and under Names in the data write device name = name in the data, one per line;
  • only those hosts are accepted; data about any other host is dropped and counted;
  • the gateway’s certificate and key are the only ones in play. This is the one case where a name from the data is used, and only to choose among the devices you listed.

Containers and Kubernetes

Run the collector as a DaemonSet (or a sidecar for one container) with the contrib image and the hostmetrics receiver with root_path: /hostfs and the node’s root mounted read-only at /hostfs. In Kubernetes the usual design is a gateway (below): node collectors send to one gateway collector, which holds the certificate.