Greetings!
I have tried to add a check_nt service to nagios to check the cpu load.
The NSClient is running on the machine and I can get a result when running the command in a terminal window.
When I try to make it work in nagios i get a Critical stating:“Socket timeout …”.
Does anyone know what might be the problem?
I have a service that checks disk space. It looks like this:
define service{
use generic-service
host_name someserver1,someserver2
service_description DISK-C
is_volatile 0
check_period workhours
max_check_attempts 3
normal_check_interval 10
retry_check_interval 30
contact_groups win-admins
notification_interval 240
notification_period workhours
notification_options c,r
check_command check_nt_disk!C!70!90
}
Hi!
My services.cfg looks somewhat like yours, the difference is the notification_options and the use-generic-sevice and when it comes to the checkcommands.cfg it is exactly like yours.
Starting nagios with -v gives no errors and no warnings.
Question: Does your check_nt work?
I tried running the check_nt command from the command line and it worked fine!!
put -t 30 on the end of the check command (or less if you think it’s too much) THe check_nt checks sometimes take a little while to perform and nagios get’s bored waiting.
Yes, my check_nt works for useddiskspace and fileage. I actually went back to an older version of check_nt because the fileage switch was returning seconds from 1970 rather than %Year/%Month/%Day.
The old check_nt and the new check_nt both successfully got a result though. I see no reason why yours will not work.
Have you tried any other checks like diskspace or memusage? Can you get any check_nt option to work? Edited Thu Mar 10 2005, 05:20PM ]
The problem is solved!
The check_nt plugin doesn’t work exactly as the other ones!
The $HOSTNAME$ variable isn’t resolved to a proper ip-adress using the information in hosts.cfg.
Instead it uses the /etc/hosts file or DNS to resolve the ip-adress.
Putting the correct ebtry into /etc/hosts solved my problem!