Is there a way to properly install netdata on a compute instance which gets wiped and reloaded from an image each time it reboots?
I got close to a solution. I got netdata installed in the base image, which gets started through systemd. I thought I could add these lines to /usr/lib/systemd/system/netdata.service
, I put them after ExecStartPre=/bin/chown -R netdata /run/netdata
and before PermissionsStartOnly=true
:
ExecStartPost=/bin/sh -c 'wget -O /tmp/netdata-kickstart.sh https://my-netdata.io/kickstart.sh'
ExecStartPost=/bin/sh /tmp/netdata-kickstart.sh --claim-token secret --claim-url https://app.netdata.cloud
This works, except the node gets registered as a new node, while the previous instance of the node is dead and I have to delete it from the dashboard. I didn’t think this would happen since the secret claim-token remains static…