Problem/Question
I have a problem, i wan automatize the process for connect a node with netdatacloud, but when i claim my node with netdata-claim.sh and i pass my token, room, url, hostname and id of the form -id=$(uuidgen), netdatacloud also creates a new node and does’n connect with the old node instance.
PD: i was installed the netdata with the way kickstart with the command: bash <(curl -Ss https://my-netdata.io/kickstart.sh)
What I expected to happen
what i expected to happen is that netdata cloud would use the same instance of the node that had already connected, so as not to lose the data history
Hi @Alan_Nunez , welcome!
Are the nodes you are trying to claim already claimed to the cloud?
When you pass the -id=$(uuidgen)
parameter to the claim script, it will create a new claim_id
for this node, which in turn, yes, will create a new node in the cloud.
So, I guess I’m asking why are you running the claim script on a node that is already connected? Can you describe the case please?
Thanks!
Thanks for responding quickly @Manolis_Vasilakis , what happens is that when I turn off the node and turn it on again, it doesn’t reconnect, it should be noted that this, i’m doing it through a script that runs automatically at the beginning of the node.
So how could i reconnect to the same instance without running the script automatically?
Hi Alan.
Ok, can you please describe your setup some more so we can understand the reason ? i.e. are you using vm’s, or docker instances?
In a typical setup, the claim script needs only to be run once, and then stopping and starting Netdata again should not require running the claim script again. It should connect to the cloud without having to do anything more.
Your error.log (typically located in /var/log/netdata
) should provide some more information on why it fails to connect after a restart. If possible, can you send it to manolis at netdata dot cloud so we can have a look?
Thanks!
Hi, Ok, iam using a docker instance, but i wan’t generate a new image for this, at the moment of shutting down the container, then removing it, then generating the new container with ‘docker run …’, in the room from the netdatacloud a new instance with the same name appears, so i wanted to know if there is any parameter that should be passed to the script so that it connects to the same instance that has already been used.
And the cloud.conf has:
[global]
enabled = yes
cloud base url = https://app.netdata.cloud
Hi Alan! Sorry for the late reply. Can I see the script that you mentioned in the third comment?
In general, removing the docker instance and then re-run it, it will create a brand new instance of netdata (with new unique machine guids) which cannot be matched by the cloud to be the previous instance.
You can try not remove it after stop, but just re-run it. It should retain the machine guid it had, and thus re-connect to the existing instance in the cloud.