Page 1 of 1

MSSQL instance oddity

Posted: Wed Feb 04, 2015 2:28 pm
by JohnFLi
Ive been running nagios core for a little while, and have it monitoring many mssql instances.

In core, I use a check_nt command with an argument of

Code: Select all

check_command       check_nt!SERVICESTATE! -d SHOWALL -l 'MSSQL$$ECOMSYNC'
and it works great.
so I figured I would just do the same as I move items to Nagios XI, makes since right?
SQL9.jpg
BUT
when I click on test, this is the result
COMMAND: /usr/local/nagios/libexec/check_nt -H sql9 -s "" -p 12489 -v SERVICESTATE -d SHOWALL -l 'MSSQL\$\$ECOMSYNC'
OUTPUT: MSSQL\$\$ECOMSYNC: Error

DOUBLE BUT

when saving, applying changes and check the service, it reads

Code: Select all

MSSQL$ECOMSYNC: Started
if I make it so the 'test' passes, once I apply changes, then the service fails.


ANybody else have this issue?

Re: MSSQL instance oddity

Posted: Wed Feb 04, 2015 3:31 pm
by lmiltchev
Try the following - go to Home->Service Detail->click on your service->Configure->Re-configure this service, change this:

Code: Select all

'MSSQL\$\$ECOMSYNC' 
to this:

Code: Select all

'MSSQL\$ECOMSYNC' 
and click on "Update".
Schedule a forced immediate check to verify the output. Let me know if this helped.

Re: MSSQL instance oddity

Posted: Wed Feb 04, 2015 4:40 pm
by JohnFLi
when I try your suggestion, and hit test..

Code: Select all

COMMAND: /usr/local/nagios/libexec/check_nt -H sql9 -s "" -p 12489 -v SERVICESTATE  -d SHOWALL -l 'MSSQL\\\$ECOMSYNC' 
OUTPUT:  MSSQL\\\$ECOMSYNC: Error

Re: MSSQL instance oddity

Posted: Wed Feb 04, 2015 4:45 pm
by slansing
You will likely be unable to use the test check command due to the escaping, please schedule an immediate check on the service and share the output as requested.

Re: MSSQL instance oddity

Posted: Wed Feb 04, 2015 4:52 pm
by JohnFLi

Code: Select all

MSSQL\$ECOMSYNC$: Error


I know how to make it check correctly......I was pointing out that the 'test' button doesn't not work on MSSQL with an instance name.

Re: MSSQL instance oddity

Posted: Wed Feb 04, 2015 5:57 pm
by abrist
It should, it may just be having a problem with the dollar signs. Do you have an instance name that does not use dollar signs to test against?

Re: MSSQL instance oddity

Posted: Wed Feb 04, 2015 6:32 pm
by JohnFLi
sadly, that is how they are all listed (with $ sign) in windows services.

Re: MSSQL instance oddity

Posted: Thu Feb 05, 2015 10:23 am
by abrist
I guess we have been aware of this for some time. As some plugins handle escaping differently than others, it is not really possible to make the test check command escape everything correctly for *all* plugins. This is brought p enough though that it my make sense in XI to make this a one off.