MSSQL instance oddity

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
User avatar
JohnFLi
Posts: 517
Joined: Mon Jun 17, 2013 3:11 pm

MSSQL instance oddity

Post 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?
You do not have the required permissions to view the files attached to this post.
Everybody is somebody else’s weirdo
User avatar
lmiltchev
Former Nagios Staff
Posts: 13587
Joined: Mon May 23, 2011 12:15 pm

Re: MSSQL instance oddity

Post 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.
Be sure to check out our Knowledgebase for helpful articles and solutions!
User avatar
JohnFLi
Posts: 517
Joined: Mon Jun 17, 2013 3:11 pm

Re: MSSQL instance oddity

Post 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
Everybody is somebody else’s weirdo
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: MSSQL instance oddity

Post 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.
User avatar
JohnFLi
Posts: 517
Joined: Mon Jun 17, 2013 3:11 pm

Re: MSSQL instance oddity

Post 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.
Everybody is somebody else’s weirdo
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: MSSQL instance oddity

Post 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?
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
User avatar
JohnFLi
Posts: 517
Joined: Mon Jun 17, 2013 3:11 pm

Re: MSSQL instance oddity

Post by JohnFLi »

sadly, that is how they are all listed (with $ sign) in windows services.
Everybody is somebody else’s weirdo
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: MSSQL instance oddity

Post 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.
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
Locked