Issue monitoring SQL based Windows services

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
rferebee
Posts: 733
Joined: Wed Jul 11, 2018 11:37 am

Issue monitoring SQL based Windows services

Post by rferebee »

Hello,

I'm attempting to monitor some SQL based services listed in Windows services and I'm encountering an error that I don't understand. These are what I'm trying to monitor:

MSSQL$ADFS -- SQL Server (ADFS) = doesn't work

MSSQL$ADMT -- SQL Server (ADMT) = doesn't work

MSSQLSERVER -- SQL Server (MSSQLSERVER) = works

MSSQL$SKYPE2015ARCMON -- SQL Server (SKYPE2015ARCMON) = doesn't work

MSSQL$SKYPE2015BACKEND -- SQL Server (SKYPE2015BACKEND) = doesn't work

Left is the service name and right is the display name. It seems the services with the '$' in the name Nagios can't find. Here's the output from the Run Check Command:

[nagios@nagiosxi ~]$ /usr/local/nagios/libexec/check_nt -H 10.131.11.170 -s "" -p 1248 -v SERVICESTATE -l MSSQL$ADFS -d SHOWALLMSSQL: Not found

The MSSQLSERVER service works fine, but the others do not. Is there some syntax issue I'm not aware of? I'm just using the built in Windows Service check (check_xi_service_nsclient).

Thank you.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Issue monitoring SQL based Windows services

Post by scottwilkerson »

You need to escape the $ with \$$

For example
MSSQL\$$ADFS

see
https://support.nagios.com/kb/article.php?id=168
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
SteveBeauchemin
Posts: 524
Joined: Mon Oct 14, 2013 7:19 pm

Re: Issue monitoring SQL based Windows services

Post by SteveBeauchemin »

In my Nagios XI GUI I have done this a couple ways with success.

As a $ARG1$ -a service=SQLAgent'$$'SQL10
Also simply 2 $$ next to each other where I just need one.
Like this as $ARG3$ security$$name

Funny that I never used a \ in front, though you still double up the $$. Now I need to try that and maybe have 3 ways to do it.

Thanks Scott.

Steve B
XI 5.7.3 / Core 4.4.6 / NagVis 1.9.8 / LiveStatus 1.5.0p11 / RRDCached 1.7.0 / Redis 3.2.8 /
SNMPTT / Gearman 0.33-7 / Mod_Gearman 3.0.7 / NLS 2.0.8 / NNA 2.3.1 /
NSClient 0.5.0 / NRPE Solaris 3.2.1 Linux 3.2.1 HPUX 3.2.1
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Issue monitoring SQL based Windows services

Post by scottwilkerson »

SteveBeauchemin wrote:In my Nagios XI GUI I have done this a couple ways with success.

As a $ARG1$ -a service=SQLAgent'$$'SQL10
Also simply 2 $$ next to each other where I just need one.
Like this as $ARG3$ security$$name

Funny that I never used a \ in front, though you still double up the $$. Now I need to try that and maybe have 3 ways to do it.

Thanks Scott.

Steve B
As in the doc, for some reason when passing to NSClient++ it is what's required...

good luck!
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
rferebee
Posts: 733
Joined: Wed Jul 11, 2018 11:37 am

Re: Issue monitoring SQL based Windows services

Post by rferebee »

Hmmm, it didn't work for me with \$$. I had to use a single $ with the \ and that did the trick.

Thanks all for the replies.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Issue monitoring SQL based Windows services

Post by scottwilkerson »

rferebee wrote:Hmmm, it didn't work for me with \$$. I had to use a single $ with the \ and that did the trick.

Thanks all for the replies.
Glad you got it!

Locking thread
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
Locked