Page 1 of 1

Are NLS Cluster IDs supposed to be unique?

Posted: Tue Oct 01, 2019 8:58 am
by jaimie.livingston
We are evaluating NLS for our environments, and I've noticed that the cluster IDs for servers deployed from a common VM template are the same...

In the current iteration of our tests the VM template used was created in a Test&Dev environment and NLS was installed up to the point of the first login via the WebUI. We then copied the templates into the secured staging environments for additional testing. We do it in this manner as the staging environments do NOT have Internet access which appears to be required to install the NLS software.

After the NLS server VM is created in the target environment, the server hostname and IPs are set specific to that environment, and we load the NLS start/install page (http://targetserver/nagioslogserver/install) to complete the installation.

It's at this point that we've noticed that the Cluster ID for each and every cluster created from the common template is the same...

So, my questions:

How important is it for the cluster ids to be unique?
Does it matter that the cluster IDs for clusters in completely separate environments are the same?

If Cluster IDs must be unique, at what stage are they created?
Can they be changed via script, command, or config file?

Is there a better way to deploy NLS into a secure environment where Internet access is restricted or unavailable?

Thanks,

Jaimie Livingston

Re: Are NLS Cluster IDs supposed to be unique?

Posted: Tue Oct 01, 2019 11:15 am
by scottwilkerson
Yes they are supposed to be unique and you could run into big trouble if you had 2 different clusters with the same ID identify themselves and join one-another.

The cluster ID is set on install. If you are going to deploy from templates like this I would strongly recommend doing the following on your template machine

Code: Select all

systemctl stop cron
wait at least 1 minute from php cron's to exit

remove uuid file

Code: Select all

rm -f /usr/local/nagioslogserver/var/*_uuid
then shutdown the machine.

Or alternatively, run the following when you bring up a new template

Code: Select all

rm -f /usr/local/nagioslogserver/var/*_uuid

Re: Are NLS Cluster IDs supposed to be unique?

Posted: Tue Oct 01, 2019 12:02 pm
by jaimie.livingston
Thanks. I'll test and then add this to the deployment procedures.

Re: Are NLS Cluster IDs supposed to be unique?

Posted: Tue Oct 01, 2019 12:03 pm
by scottwilkerson
jaimie.livingston wrote:Thanks. I'll test and then add this to the deployment procedures.
Sounds good

Re: Are NLS Cluster IDs supposed to be unique?

Posted: Tue Oct 01, 2019 1:49 pm
by jaimie.livingston
All good.
Deleting the node and cluster UUID files on the template worked a charm.

Re: Are NLS Cluster IDs supposed to be unique?

Posted: Tue Oct 01, 2019 1:55 pm
by scottwilkerson
jaimie.livingston wrote:All good.
Deleting the node and cluster UUID files on the template worked a charm.
Great!

Locking thread