Skip to content

Adding Collectors

The bundle starts one collector that auto-joins using the GRIDNMS_COLLECTOR_AUTO_JOIN_SECRET in your .env. Run more collectors — for other sites or network segments — by pointing additional collector containers at the same server with the same join secret. Each one appears in Admin → Collectors, where you assign it networks.

Terminal window
docker compose -f docker-compose.selfhosted.yml up -d --scale collector=3

On a separate Linux host (recommended with host networking so syslog and traps preserve the real source IP — see Collectors & source IPs):

Terminal window
docker run -d --name gridnms-collector --restart unless-stopped \
--network host \
-e GRIDNMS_TUNNEL_URL="https://<your-control-plane>/api/tunnel/ws" \
-e GRIDNMS_STATE_DIR=/var/lib/gridnms \
-v gridnms-collector-state:/var/lib/gridnms \
gridnms/collector:latest-<arch>

A collector only monitors and only initiates connections within the networks assigned to it in Admin → Collectors. This network assignment is the permission boundary — assign the CIDRs each collector is responsible for, and it picks up the devices in those ranges.