I have a strange problem: Icinga (nagios) doesn't run check_nt
which I've set up on a debian box.
What I do is that I schedule a forced check of both NSClient_version
and PING
. If I look in the log file, I can see that both commands are scheduled to run:
[1372774536] EXTERNAL COMMAND: SCHEDULE_FORCED_SVC_CHECK;sqlnota03.dbb.dk;NSClient_version;1372781738
[1372774536] EXTERNAL COMMAND: SCHEDULE_FORCED_SVC_CHECK;sqlnota03.dbb.dk;PING;1372781738
After having switched on debugging, I get this:
[1372774536.502948] [016.2] [pid=3840] Found another service check event for service 'NSClient_version' on host 'sqlnota03.dbb.dk' @ Tue Jul 2 17:47:21 2013
[1372774536.502973] [016.2] [pid=3840] Keeping original service check event (ignoring the new one).
I've gone over the configuration many times and couldn't find any errors and Icinga reports that the configuration is ok when running icinga -v <icinga.cfg>
.
Is there anyone who can spot what I am doing wrong?
The configuration is:
define host {
use windows-server
host_name <the host>
address 192.168.1.61
hostgroups mssql, termsrv, windows, nsclient_version
}
define service {
use generic-service
hostgroup_name nsclient_version
service_description NSClient_version
servicegroups nsclient_version
check_command check_nt!CLIENTVERSION
}
# 'check_nt' command definition
define command {
command_name check_nt
command_line check_nt command_line /usr/lib/nagios/plugins/check_nt -p12489 -s <snip> -H '$HOSTADDRESS$' -v '$ARG1$' '$ARG2' '$ARG3'
}
It seems that there is a service check stuck somewhere in the system that keeps Icinga from running a new one?!?
I've replaced the check_nt
command that should be run with a small script that just touches a local file in /tmp
to see if it is being run at all. This isn't the case.
Edit
I used the old nagios web interface to schedule a new check and (finally) got this:
Processing: 'SERVICE ALERT: sqlnota03.db
b.dk;NSClient_version;$SERVICESTATE$;$SERVICESTATETYPE$;$SERVICEATTEMPT$;The com
mand defined for service NSClient_version does not exist
Now I'm unsure what the message means – that the executable check_nt
can't be found or something else…?
Best Answer
I found the error.
It was a combination of two things:
command_line
parameter was wrong.So I changed this:
To this:
I am surprised how much time it took to make Icinga run an actual check so I could diagnose the error.