Hi Team,
I would like to add one windows service in monitoring.
Seems the service having the special character and escape while checking the status of the service.
Service name : MSSQL$MICROSOFT##SSEE
Kindly guide to enable monitoring.
Rgds
Srini
Monitoring windows service with special character (#)
-
sify_nagios
- Posts: 54
- Joined: Thu Aug 20, 2015 8:01 am
Re: Monitoring windows service with special character (#)
I don't think it's the # that's messing it up, but rather the $. Try replacing it with MSSQL"$$"MICROSOFT##SE, or perhaps MSSQL\\$$MICROSOFT##SE.
Former Nagios Employee
-
sify_nagios
- Posts: 54
- Joined: Thu Aug 20, 2015 8:01 am
Re: Monitoring windows service with special character (#)
While i check from Nagios XI test command option..
I have given service name as MSSQL"$"MICROSOFT##SSEE
when i try your suggestion.
Given service name MSSQL"$$"MICROSOFT##SSEE
But when i try the same from CLI it was a absolute shocker...
I wonder what i am missing.. Kindly help us out.
Rgds
Srini
I have given service name as MSSQL"$"MICROSOFT##SSEE
Code: Select all
COMMAND: /usr/local/nagios/libexec/check_nt -H 172.20.22.115 -s "" -p 12489 -v SERVICESTATE -l MSSQL"\$"MICROSOFT
OUTPUT: MSSQL$MICROSOFT: Not found
Given service name MSSQL"$$"MICROSOFT##SSEE
Code: Select all
COMMAND: /usr/local/nagios/libexec/check_nt -H 172.20.22.115 -s "" -p 12489 -v SERVICESTATE -l MSSQL"\$\$"MICROSOFT
OUTPUT: MSSQL$$MICROSOFT: Not found
Code: Select all
[root@Nagiosprimary /]# /usr/local/nagios/libexec/check_nt -H 172.20.22.115 -s "" -p 12489 -v SERVICESTATE -l MSSQL"$"MICROSOFT##SSEE
OK: All services are in their appropriate state.
[root@Nagiosprimary /]#
Rgds
Srini
Re: Monitoring windows service with special character (#)
Testing from within the CCM doesn't always work properly because of escaping issues. If the check works from the CLI, the chances are it is going to work in Nagios XI as well. What is the output when you force an immediate check under "Service Status Detail".
Go to Home->Service Detail-><your service>->Configure->Re-configure this service, and show us the command that you have in the "Monitor the service with this command" field.
Go to Home->Service Detail-><your service>->Configure->Re-configure this service, and show us the command that you have in the "Monitor the service with this command" field.
Be sure to check out our Knowledgebase for helpful articles and solutions!
- Box293
- Too Basu
- Posts: 5126
- Joined: Sun Feb 07, 2010 10:55 pm
- Location: Deniliquin, Australia
- Contact:
Re: Monitoring windows service with special character (#)
This KB article explains the solution to your problem:
https://support.nagios.com/kb/article.php?id=168
https://support.nagios.com/kb/article.php?id=168
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
-
sify_nagios
- Posts: 54
- Joined: Thu Aug 20, 2015 8:01 am
Re: Monitoring windows service with special character (#)
Hi Troy,
It seems the service returns as "All services in appropriate state".
I wonder whether its returning correct value or not. Bcus all other services simply says servicename is started unlike this one.
How to make sure whether its returning critical whenever the service is stopped without stopping service in client server.Please guide me on the same.
Rgds
Srini
It seems the service returns as "All services in appropriate state".
I wonder whether its returning correct value or not. Bcus all other services simply says servicename is started unlike this one.
How to make sure whether its returning critical whenever the service is stopped without stopping service in client server.Please guide me on the same.
Rgds
Srini
You do not have the required permissions to view the files attached to this post.
Re: Monitoring windows service with special character (#)
You may have a few, similarly named services... To show the status of all of them, add "-d SHOWALL" to your command. Here's the check_nt usage (with SERVICESTATE):
SERVICESTATE =
Check the state of one or several services.
Request a -l parameters with the following syntax:
-l <service1>,<service2>,<service3>,...
You can specify -d SHOWALL in case you want to see working services
in the returned string.
Be sure to check out our Knowledgebase for helpful articles and solutions!