We have a Windows Internal Database for WSUS we'd like to monitor. How do we go about monitoring this service due to the special characters in the name?
Service name: MSSQL$MICROSOFT##WID
define service{
use generic-service
host_name VCAUTIL01
service_description MSSQL$MICROSOFT##WID
event_handler win_service_restart
event_handler_enabled 1
check_command check_nt!SERVICESTATE!-d SHOWALL -l $SERVICEDESC$
}
Thanks,
Paolo
Service Monitoring with Special Characters
Re: Service Monitoring with Special Characters
Try changing the $ to "$$" (with the double quotes), I'm not sure if you'll need to escape out the ## or not. Could you try this, and let us know what the check is reporting?
Former Nagios Employee
Re: Service Monitoring with Special Characters
Your service definition will need a backslash \ and two $$ signs.
MSSQL\$$INSTANCE
Refer to this doc https://support.nagios.com/kb/article.php?id=168
MSSQL\$$INSTANCE
Refer to this doc https://support.nagios.com/kb/article.php?id=168
Be sure to check out the Knowledgebase for helpful articles and solutions!
Re: Service Monitoring with Special Characters
Thanks for the tips and link. Tried both "$$" and \$$. Got a check error. I did rule out that the ## doesn't require an escape. Ran a check with the name MSSQLMICROSOFT##WID and it passed.
- Box293
- Too Basu
- Posts: 5126
- Joined: Sun Feb 07, 2010 10:55 pm
- Location: Deniliquin, Australia
- Contact:
Re: Service Monitoring with Special Characters
Is it resolved?
If not, can you show us your testing command from the command line and the output produced.
If not, can you show us your testing command from the command line and the output produced.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Re: Service Monitoring with Special Characters
Unfortunately it's not resolved. Here is the command:
/usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg
/usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg
- Box293
- Too Basu
- Posts: 5126
- Joined: Sun Feb 07, 2010 10:55 pm
- Location: Deniliquin, Australia
- Contact:
Re: Service Monitoring with Special Characters
Please show us your check_nt command at the command line along with the output. Before making it work in Nagios, lets see it working on the command line first.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Re: Service Monitoring with Special Characters
Box293, would this be the correct command to run check_nt?
/usr/local/nagios/libexec/check_nt -H x.x.x.x -v SERVICESTATE -d SHOWALL -l 'MSSQL\$$MICROSOFT##WID'
/usr/local/nagios/libexec/check_nt -H x.x.x.x -v SERVICESTATE -d SHOWALL -l 'MSSQL\$$MICROSOFT##WID'
Re: Service Monitoring with Special Characters
Try running the command like the example below and see if this works for you
Code: Select all
/usr/local/nagios/libexec/check_nt -H x.x.x.x -v SERVICESTATE -d SHOWALL -l "MSSQL$"$"MICROSOFT##WID"Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: Service Monitoring with Special Characters
Ran the suggested command and got this response:
root@nagios:/# /usr/local/nagios/libexec/check_nt -H 1.2.3.4 -v SERVICESTATE -d SHOWALL -l "MSSQL$"$"MICROSOFT##WID"
Connection refused
could not fetch information from server
root@nagios:/#
Got the same results pointing to the WSUS service which we're monitoring that service successfully.
root@nagios:/# /usr/local/nagios/libexec/check_nt -H 1.2.3.4 -v SERVICESTATE -d SHOWALL -l "WsusService"
Connection refused
could not fetch information from server
root@nagios:/#
root@nagios:/# /usr/local/nagios/libexec/check_nt -H 1.2.3.4 -v SERVICESTATE -d SHOWALL -l "MSSQL$"$"MICROSOFT##WID"
Connection refused
could not fetch information from server
root@nagios:/#
Got the same results pointing to the WSUS service which we're monitoring that service successfully.
root@nagios:/# /usr/local/nagios/libexec/check_nt -H 1.2.3.4 -v SERVICESTATE -d SHOWALL -l "WsusService"
Connection refused
could not fetch information from server
root@nagios:/#