Page 1 of 1

Issue with service check

Posted: Fri Apr 11, 2014 3:36 pm
by snapon_admin
I'm having an issue getting a check to work properly. The service we are trying to monitor is MSSQL$SCANMAIL. Note the '$' that is the cause of all my headaches. When I add this service check to Nagios using the windows server wizard, naturally it doesn't work, spitting out this error: "MSSQL: Not found". So it doesn't like the dollar sign, ok I kinda figured it wouldn't. So I've tried a couple of things to fix this, and I can get it to work from the CLI, but not in the web UI. CLI looks like this:

Code: Select all

[root@lisl-ngos-01-pv etc]# /usr/local/nagios/libexec/check_nt -t 60 -H $HOSTNAME$ -s "" -p 12489 -v SERVICESTATE -l MSSQL\$SCANMAIL -d SHOWALL
 MSSQL$SCANMAIL: Started
Web GUI still gives me the same error. So I click on the service and check the configure tab and this is what I see there:

Code: Select all

check_xi_service_nsclient!!SERVICESTATE!-l MSSQL\$SCANMAIL -d SHOWALL!!!!!
Appears to be about the same as the CLI command, but doesn't work. What do?

Re: Issue with service check

Posted: Fri Apr 11, 2014 7:57 pm
by scottwilkerson
$ symbols need to be specially escaped in XI, see
http://support.nagios.com/wiki/index.ph ... ck_Command

Re: Issue with service check

Posted: Mon Apr 14, 2014 10:17 am
by snapon_admin
Bah! 2 slashes. Damn it, lol. I knew it had to be escaped, but thought it was just one backslash. Go ahead and lock this up, thanks.