Page 1 of 1

Changing Log Server's IP address

Posted: Mon Sep 23, 2019 1:44 pm
by chud
I need to change the IP address (not the hostname) of my Nagios Log Server.
I checked some of my Linux client servers that send logs, and noticed that the /etc/rsyslog.d/99-nagioslogserver.conf file on them contains the IP address-colon-port number of the Log Server.

So it seems that changing the IP of the Log Server would disrupt things.

Is there a way to solve this?

Re: Changing Log Server's IP address

Posted: Mon Sep 23, 2019 2:38 pm
by mbellerue
Yes, if you change the IP address of Log Server, and all of your clients are set to report their logs by IP address, then the configuration on each of your clients needs to be changed to reflect the new IP address. Unfortunately there's no easy way to go about doing this. The communication with Log Server is very much one-way. There's no way for Log Server to reach out to each client and tell them to update their config files.

The best you can get from Log Server is a list of all clients that are sending their logs to Log Server. From the Home screen just click on the Report link in the dashlet that shows the number of Unique Hosts. That will at least give you a list of the machines that need to be reconfigured.

Re: Changing Log Server's IP address

Posted: Wed Sep 25, 2019 2:41 pm
by chud
It is unfortunate that when you run the setup-linux.sh script on a new client it uses the Log Server's IP instead of its hostname.
Maybe this should be changed in a future release.

Re: Changing Log Server's IP address

Posted: Wed Sep 25, 2019 4:08 pm
by cdienger
You can pass the hostname when running the script:

Code: Select all

sudo bash setup-linux.sh -s hostname -p 5544
Just make sure that client is able to resolve the hostname to the NLS machine's IP and you should be good. I can submit a feature request to make this more clear in steps provided in the web UI.

Re: Changing Log Server's IP address

Posted: Thu Oct 03, 2019 9:12 am
by chud
cdienger wrote: I can submit a feature request to make this more clear in steps provided in the web UI.
Yes, please do. I was unaware of this option, it would have saved me a lot of time.

Re: Changing Log Server's IP address

Posted: Thu Oct 03, 2019 9:23 am
by scottwilkerson
It is also worth pointing out that if you set the Cluster Hostname in
Admin -> Global Settings

From that point forward the instructions will show that instead of the IP

Re: Changing Log Server's IP address

Posted: Thu Oct 03, 2019 9:28 am
by chud
Good to know, thank you.

Re: Changing Log Server's IP address

Posted: Thu Oct 03, 2019 9:30 am
by scottwilkerson
chud wrote:Good to know, thank you.
Locking thread