Recreated docker container to change hostname, got multiple unreachable nodes

Problem/Question

recreated container because i could not change the hostname
reconfigured the same, restarted and reclaimed using the docker command provided
now i have multiple nodes claimed, all unreachable

Environment/Browser

multiple Windows server 2019 with windows_exporter.exe
single windows docker container netdata/netdata:latest that collects them all
disabled container self-monitoring because it’s a container:
[plugins]
proc = no
diskspace = no
cgroups = no
tc = no
idlejitter = no
apps = no

cloud accessed with firefox 85 / chromium 88

What I expected to happen

reclaimed node to update on the cloud

Hi @audioscavenger , off topic but… why do you think it is self-monitoring? It is the host system monitoring (apps => running processes, cgroups => running containers, etc.)

I tried to reproduce the issue following your steps.

What i did:

  • created a docker container using the following command (see our docs)
docker run -d --name=netdata \
  -p 19998:19999 \
  -v netdatalib:/var/lib/netdata \
  -v netdatacache:/var/cache/netdata \
  -v /etc/passwd:/host/etc/passwd:ro \
  -v /etc/group:/host/etc/group:ro \
  -v /proc:/host/proc:ro \
  -v /sys:/host/sys:ro \
  -v /etc/os-release:/host/etc/os-release:ro \
  --restart unless-stopped \
  --cap-add SYS_PTRACE \
  --security-opt apparmor=unconfined \
  -e NETDATA_CLAIM_TOKEN=XXXX \
  -e NETDATA_CLAIM_URL="https://app.netdata.cloud" \
  -e NETDATA_CLAIM_ROOMS=XXXX \
  my_netdata

I got my instance up and claimed.

  • in order to change its hostname, i stoped and removed old instance and created a new one ( :exclamation: pay attention to -v in my prev command, it allows to persist database and claiming stuff on the host machine, so my new instance will be using it - Cloud see it as the same instance).

I executed same docker run ... command but added --hostname=my_docker_netdata0 \ (see our docs)

I get my instance up and i see it on the cloud. See the Node Name, it is changed to --hostname. No new unreachable nodes.


Claiming using env variables doesn’t work atm, i created a docker image from the PR that fixes it.

But changing hostname works, Cloud handles it.