Connection refused " status" Help
Connection refused " status" Help
Hi,
I have been tasked with the setting up of nagios xi for a proof of concept here at my office. I have been on the end-user side of things as part of the monitoring team using nagios at my previous company. This would be my first configuration from the backend. I am running nagios xi from the prebuilt vmware package on CentOS. I have installed the correct NSClient++ on my windows pc's. When monitor a windows box and go through the config wizard everything goes fine but after the initial service check the only service that comes back with "real" data is Ping. CPU usage, Disk usage memory usage and uptime all come back as "connection refused" and I don't know why or how to resolve the issue. Sounds like these checks are being blocked or I missed some plugin to install. Can someone shed some light on this please. If I left any info out that is needed please ask. Thanks.
I have been tasked with the setting up of nagios xi for a proof of concept here at my office. I have been on the end-user side of things as part of the monitoring team using nagios at my previous company. This would be my first configuration from the backend. I am running nagios xi from the prebuilt vmware package on CentOS. I have installed the correct NSClient++ on my windows pc's. When monitor a windows box and go through the config wizard everything goes fine but after the initial service check the only service that comes back with "real" data is Ping. CPU usage, Disk usage memory usage and uptime all come back as "connection refused" and I don't know why or how to resolve the issue. Sounds like these checks are being blocked or I missed some plugin to install. Can someone shed some light on this please. If I left any info out that is needed please ask. Thanks.
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: Connection refused " status" Help
There are a quite a few thinks that need to be in place when using NSClient++
Did you set the allowed_hosts in the NSC.ini file in the NSClient++ directory?
Is the NSClient++ service running?
Is there a firewall that could be blocking port 5666?
Finally, can you look at the nsclient.log ?
Here are some additional resources
http://assets.nagios.com/downloads/nagi ... _Agent.pdf
http://assets.nagios.com/downloads/nagi ... Client.pdf
Did you set the allowed_hosts in the NSC.ini file in the NSClient++ directory?
Is the NSClient++ service running?
Is there a firewall that could be blocking port 5666?
Finally, can you look at the nsclient.log ?
Here are some additional resources
http://assets.nagios.com/downloads/nagi ... _Agent.pdf
http://assets.nagios.com/downloads/nagi ... Client.pdf
Re: Connection refused " status" Help
Thanks, the NSClient++ service was not running so I started that and modified the .ini for it. After that, the new service status info is now "could not fetch information from server" I do not have a firewall blocking it.
Re: Connection refused " status" Help
Make sure port 12489 is not blocked. Also, after ANY change in the nsc.ini, you must restart the nsclient++ service, so the changes can take effect.
Can you run the following command from the command line and post the output?
Can you run the following command from the command line and post the output?
Code: Select all
# ./check_nt -H <your_target_machine's_IP_address> -s <your_password> -p 12489 -v MEMUSE -w 80 -c 90Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: Connection refused " status" Help
output:
-bash: ./check_nt: No such file or directory
-bash: ./check_nt: No such file or directory
Re: Connection refused " status" Help
My bad. Forgot to mention that you have to start this command from your plugins' directory on your nagios server:
Code: Select all
# cd /usr/local/nagios/libexec
# ./check_nt -H <your_target_machine's_IP_address> -s <your_password> -p 12489 -v MEMUSE -w 80 -c 90Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: Connection refused " status" Help
I seemed to get output this time. Forgive me for for being a noob but how can I copy the output from the terminal and paste outside of the vm?
btw, the output I received seems to be "help" or examples and definitions of the check command.
btw, the output I received seems to be "help" or examples and definitions of the check command.
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: Connection refused " status" Help
I am guessing you used a lowercase -h instead of the required capital -Hbviscount wrote:I seemed to get output this time. Forgive me for for being a noob but how can I copy the output from the terminal and paste outside of the vm?
btw, the output I received seems to be "help" or examples and definitions of the check command.
As for copying text from the VM, it is much easier if you connect to the VM with an SSH client like PuTTY
http://www.chiark.greenend.org.uk/~sgtatham/putty/
Re: Connection refused " status" Help
Output:
could not fetch information from server
[root@localhost libexec]# could not fetch information from server
tx for the putty advice.
could not fetch information from server
[root@localhost libexec]# could not fetch information from server
tx for the putty advice.
Re: Connection refused " status" Help
Did you check if your port 12489 is open?
On your windows machine you can open a Command Prompt (Run->cmd.exe->Enter) and run:
You can then open the "openports.txt" file in a text editor and see if port 12489 is listening.
Also, from your Nagios server you can try:
Also, double check in your nsc.ini file for the lines:
Make sure you have your nagios server IP listed there
and this one:
Make sure you use the same password, when you run your check from the command line.
On your windows machine you can open a Command Prompt (Run->cmd.exe->Enter) and run:
Code: Select all
# netstat -an |find /i "listening" > c:openports.txtAlso, from your Nagios server you can try:
Code: Select all
# telnet <your_target_machine's_IP_address> 12489Code: Select all
allowed_hosts=and this one:
Code: Select all
password=Be sure to check out our Knowledgebase for helpful articles and solutions!