Localhost connection refused?


Hi All,

I’m new here and I have searched Google for the issue I am encountering, but have had no luck in finding a resolution. I have Nagios 3.2.0 installed on an Ubuntu 9.04 system and I have agents installed on multiple Windows Servers. Nagios is able to monitor the Windows systems perfectly, but I am having problems getting Nagios to monitor the system it is running on. While I am testing, I do have the firewall (ufw) turned off on the monitoring host. I am getting these errors in the Nagios log:

localhost;Memory Usage;CRITICAL;notify-service-by-email;Connection refused
localhost;Uptime;CRITICAL;notify-service-by-email;Connection refused
localhost;CPU Load;CRITICAL;notify-service-by-email;Connection refused

I find it strange because the other alarms, Current Load, Curent Users, Root Partition, etc… for the localhost are green.

Any assistance would be appreciated.

Kind regards,


I found the problem. Since only certain services were failing to poll on the Ubuntu host, I knew my permissions were correct. I commented out my windows.cfg and restarted Nagios. After the Nagios restart, all of my host processes came up green. The problem was that I had used a wild card for my “define service” options in my windows.cfg file. Example:

define service{ use generic-service host_name * service_description NSClient++ Version check_command check_nt!CLIENTVERSION }

Apparently the wild cards will apply to servers in other cfg files. Not what I was expecting. I removed the wildcard, and changed host_name to hostgroup_name to resolve the problem.

define service{ use generic-service hostgroup_name windows-2k-servers service_description NSClient++ Version check_command check_nt!CLIENTVERSION }

Hope this helps anyone else who runs into this problems. IMHO, the wild card in the cfg file should only apply to the servers listed in the config file, not globally.

Kind regards,