Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I'm setting up a monitoring system for our servers. I installed nagios on a linux box and then I installed nsclient++ (with these instruction http://nagios.sourceforge.net/docs/3_0/monitoring-windows.html) (windows server 2008 r2). I thought it was easy but nsclient++ doesn't communicate with my nagios box. All services are down. Nsclient'log is this but I can't figure out what's wrong. enter image description here

Launching nsclient from the console doesn't give me any error so it seems it ok.

UPDATE: I found 1 error due to Rackspace networking and the firewall. Now if I run manually

/usr/lib/nagios/plugins/check_nt -H IP -p 12489 -v UPTIME

it works fine, I set the same IP used here in the windows.cfg config file but in Nagios everything is still not working

Have you any idea?

share|improve this question
    
You can make sure that nsclient is listening and waiting for requests. Use netstat -anb. –  Khaled Jan 25 '11 at 6:31
    
@Khaled Yes it's listening, but on my remote linux I don't see it open. I'm now with rackspace support to understand why –  Davide Vosti Jan 25 '11 at 7:50
    
Ok port is open, firewall is down. Still not working –  Davide Vosti Jan 25 '11 at 8:33

2 Answers 2

up vote 1 down vote accepted

If the command works fine from command line check commands.cfg at nagios server for the check_nt UPTIME service and replicate it to your service command:

define command{
    command_name    check_nt_uptime
    command_line    $USER1$/check_nt -H $HOSTADDRESS$ -p 12489 -v UPTIME
    }

--

define service{
    use                             windows.template
    host_name                       hostname
    service_description             Uptime
    check_command                   check_nt_uptime
    }

Regards.

share|improve this answer
    
It works!!! I copied the windows.cfg and commands.cfg from the debian templates, I suppose they are broken with my config! –  Davide Vosti Jan 25 '11 at 15:21

Instead of using the "Log viewer". Id recomend running nsclient++ in "/test mode" as that will also enable debug log.

So try the following:

nsclient++ /stop
nsclient++ /test
...
... (run commands from nagios, ans see where what happens...)
...
exit
nsclient++ /start

In most cases though this is related to the built-in firewall which many people forget to configure.

share|improve this answer
    
See the update on my question I got some news –  Davide Vosti Jan 25 '11 at 12:29

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.