Change the ip addresses of NLS cluster

This support forum board is for support questions relating to Nagios Log Server, our solution for managing and monitoring critical log data.
bennspectrum
Posts: 30
Joined: Wed May 11, 2016 4:24 am

Change the ip addresses of NLS cluster

Post by bennspectrum »

Hello team,

I have a problem here. In the beginning, I installed the 2 nodes NLS cluster, and the ip address were 192.168.0.47 and 192.168.0.48, respectively. Afterwards, I changed the ip addresses to 192.168.0.118 and 192.168.0.119, respectively. Set up the /usr/local/nagioslogserver/var/cluster_hosts to 192.168.0.118, 192.168.0.119.
擷取.PNG
I thought everything is OK, but when I input

Code: Select all

curl 'localhost:9200/_cat/master?v'
It's seem to like NLS still consider the master is 192.168.0.48. What's should I do?

By the way, I want to backup my log data but it not working. I guess maybe I solve the problem above the backup function do work normally. Thanks.
You do not have the required permissions to view the files attached to this post.
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: Change the ip addresses of NLS cluster

Post by rkennedy »

Just to make sure we're on the same page, could you provide the exact steps you've followed so far? Please post a copy of your /etc/hosts file as it will help as well to see if something is stuck in DNS.
Former Nagios Employee
bennspectrum
Posts: 30
Joined: Wed May 11, 2016 4:24 am

Re: Change the ip addresses of NLS cluster

Post by bennspectrum »

Thanks to your reply, rkennedy.

The steps are shown as following,

1. I installed the 2 nodes NLS cluster on two CentOS machines, and the dhcp ip adrdess of the two CentOS machines are 192.168.0.47 and 192.168.0.48, respectively.

2. I changed the two ip addresses to 192.168.0.118 and 192.168.0.119, and restart the NLS cluster.

3. I found that the two nodes of the NLS cluster could not find each other, so I search the solve method on nagios forum and found out the way below.
https://support.nagios.com/forum/viewto ... er#p185409

the output of

Code: Select all

cat /usr/local/nagioslogserver/var/cluster_hosts
118.PNG
119.PNG
4. I set up the cluster_hosts file and the NLS cluster nodes could find each other. I considered that it was success, but when I input

Code: Select all

curl 'localhost:9200/_cat/master?v'
, the output show the master node ip is 192.168.0.48.

Could someone tell me what configuration do I omission?
You do not have the required permissions to view the files attached to this post.
User avatar
hsmith
Agent Smith
Posts: 3539
Joined: Thu Jul 30, 2015 11:09 am
Location: 127.0.0.1
Contact:

Re: Change the ip addresses of NLS cluster

Post by hsmith »

Can you tell me what 'interface URL' says under Administration > General > Global Settings? Also, under Instance Status in the Global Configuration menu can you make sure the IPs are correct?
Former Nagios Employee.
me.
bennspectrum
Posts: 30
Joined: Wed May 11, 2016 4:24 am

Re: Change the ip addresses of NLS cluster

Post by bennspectrum »

Thank you!!! hsmith

I change it to http://192.168.0.118, origin is http://192.168.0.47
擷取.PNG
Now, it become 127.0.0.1, Is it normal?
擷取1.PNG
You do not have the required permissions to view the files attached to this post.
User avatar
hsmith
Agent Smith
Posts: 3539
Joined: Thu Jul 30, 2015 11:09 am
Location: 127.0.0.1
Contact:

Re: Change the ip addresses of NLS cluster

Post by hsmith »

Not the same thing I see on mine. Is it showing on both nodes as 127.0.0.1 ?
Former Nagios Employee.
me.
bennspectrum
Posts: 30
Joined: Wed May 11, 2016 4:24 am

Re: Change the ip addresses of NLS cluster

Post by bennspectrum »

To hsmith,

Yes, both nodes are 127.0.0.1.
User avatar
hsmith
Agent Smith
Posts: 3539
Joined: Thu Jul 30, 2015 11:09 am
Location: 127.0.0.1
Contact:

Re: Change the ip addresses of NLS cluster

Post by hsmith »

If both nodes think they are the master, you might have a problem. Can I see the output of the previous command on both nodes?
Former Nagios Employee.
me.
bennspectrum
Posts: 30
Joined: Wed May 11, 2016 4:24 am

Re: Change the ip addresses of NLS cluster

Post by bennspectrum »

Thank you hsmith,

I am sorry, I already removed them and reinstalled one.
User avatar
mcapra
Posts: 3739
Joined: Thu May 05, 2016 3:54 pm

Re: Change the ip addresses of NLS cluster

Post by mcapra »

Were you able to solve your problem? Is it alright if we lock this thread and mark the issue as resolved?
Former Nagios employee
https://www.mcapra.com/
Locked