Page 1 of 4

host status keep showing as being down

Posted: Thu Sep 28, 2017 10:04 am
by crystal
I added ip address of my windows server to nagiosxi to monitor it and I also installed the nsclient++ agent but it always shows me as being down.

Re: host status keep showing as being down

Posted: Thu Sep 28, 2017 10:08 am
by kyang
Did you add the IP address of your Nagios server into the nsclient.ini file under allowed hosts?

Did you allow port 12489 on your Nagios server?

Is there any specific message on Nagios XI, next to the host when it is down?

Re: host status keep showing as being down

Posted: Thu Sep 28, 2017 10:28 am
by crystal
It shows me "CRITICAL - Socket timeout after 10 seconds"

Re: host status keep showing as being down

Posted: Thu Sep 28, 2017 10:32 am
by kyang
Do you have port 12498 open on your Nagios Server?

How about the IP address of your nagios server in your nsclient.ini file located on your windows server. (Where you installed NSClient++)

Did you follow any documentation when you installed NSClient++?

Re: host status keep showing as being down

Posted: Thu Sep 28, 2017 10:42 am
by crystal
I don't think I open port 12489, but how can I open it?

Re: host status keep showing as being down

Posted: Thu Sep 28, 2017 11:14 am
by kyang
What OS are you running Nagios XI on?

What firewall do you have installed? iptables? firewalld?

These are the commands to allow port 12489. Choose the one depending on the firewall you have installed.

iptables

Code: Select all

iptables -I INPUT -p tcp --destination-port 12489 -j ACCEPT
service iptables save
OR

firewalld

Code: Select all

firewall-cmd --zone=public --add-port=12489/tcp
firewall-cmd --zone=public --add-port=12489/tcp --permanent

Re: host status keep showing as being down

Posted: Thu Sep 28, 2017 11:51 am
by crystal
I use rhal7 as my o/s. However when I started my iptables or firewall, I can't reach to nagios website.

Re: host status keep showing as being down

Posted: Thu Sep 28, 2017 12:12 pm
by kyang
Can you tell me which command you did for --> (started my iptables)? I don't see why the Nagios website can't be accessed.
Let us know what you did.

It was my mistake, port 12489 is supposed to be opened on your Windows Server.
Do you have any connection from Windows to Nagios?

Also, it's best to let us know what documentation or guidelines you followed when you were installing NSClient++.

Re: host status keep showing as being down

Posted: Thu Sep 28, 2017 12:25 pm
by crystal
I used this website https://assets.nagios.com/downloads/nag ... ios-XI.pdf to install my nsclient
I created nagiosxi in EC2 and I logged into Nagiosxi using the IP address provided by EC2. I typed the first command to add the port to iptables and start it, but then I can't access to nagios website

Re: host status keep showing as being down

Posted: Thu Sep 28, 2017 12:49 pm
by kyang
Let's try deleting the added port. Run this

Code: Select all

iptables -D INPUT -p tcp --destination-port 12489 -j ACCEPT
service iptables save
Try to see if you are able to access the Nagios website after this.

Could you post your nsclient.ini file?