Issue with service check

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
User avatar
snapon_admin
Posts: 952
Joined: Mon Jun 10, 2013 10:39 am
Location: Kenosha, WI
Contact:

Issue with service check

Post 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?
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Issue with service check

Post by scottwilkerson »

$ symbols need to be specially escaped in XI, see
http://support.nagios.com/wiki/index.ph ... ck_Command
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
User avatar
snapon_admin
Posts: 952
Joined: Mon Jun 10, 2013 10:39 am
Location: Kenosha, WI
Contact:

Re: Issue with service check

Post 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.
Locked