NagiosXI 2012R2.9
check_nrpe Version: 2.12
NSClient version 0,4,1,102
Can someone advice me how to check Windows Service Name that has () in the name?
I know I can use the short name but I want to use the long Desc.
Using Nscp test it seem fine but from check_nrpe it does not work
Without brackets in the name, works fine
[nagios@nagiosdevxi1 libexec]$ ./check_nrpe -H 10.103.4.22 -c CheckServiceState -a "Corona 76 Server" ShowAll=Long
OK: Corona 76 Server: started
With brackets does not work
[nagios@nagiosdevxi1 libexec]$ ./check_nrpe -H 10.111.1.111 -c CheckServiceState -a "Corona 76 xMi Service (corona 7.6)" ShowAll=Long
CRITICAL: Corona 76 xMi Service (corona 7.6): not found (critical)
I have tried escaping, doubling the brackets still does not work.
Thanks
NSClient CheckServiceState issue
NSClient CheckServiceState issue
5 x Nagios 5.6.9 Enterprise Edition
RHEL 6 & 7
rrdcached & ramdisk optimisation
RHEL 6 & 7
rrdcached & ramdisk optimisation
-
sreinhardt
- -fno-stack-protector
- Posts: 4366
- Joined: Mon Nov 19, 2012 12:10 pm
Re: NSClient CheckServiceState issue
I may be mistaken, but last I tried, service name was the only option to match and not description. You may try something like the link below, but since your service has spaces in the name I don't believe this will work too well.
https://www.nsclient.org/nscp/discussion/message/2415
https://www.nsclient.org/nscp/discussion/message/2415
Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.
Re: NSClient CheckServiceState issue
I tried and both service and description works in most cases.sreinhardt wrote:I may be mistaken, but last I tried, service name was the only option to match and not description. You may try something like the link below, but since your service has spaces in the name I don't believe this will work too well.
https://www.nsclient.org/nscp/discussion/message/2415
Based on your link I tried the $$ but does not work also.
check_nrpe_win!CheckServiceState!"Corona 76 xMi Service $$corona 7.6$$"!
The workaround would be to use the service name.
Hope someone has other pointers on how to get this to work.
5 x Nagios 5.6.9 Enterprise Edition
RHEL 6 & 7
rrdcached & ramdisk optimisation
RHEL 6 & 7
rrdcached & ramdisk optimisation
- Box293
- Too Basu
- Posts: 5126
- Joined: Sun Feb 07, 2010 10:55 pm
- Location: Deniliquin, Australia
- Contact:
Re: NSClient CheckServiceState issue
I did some tests from the command line and it doesn't seem to have a problem with brackets
That example is using the service Display name
Code: Select all
[root@localhost libexec]# /usr/local/nagios/libexec/check_nrpe -H 192.168.1.128 -c CheckServiceState -a "NSClient++ (x64)" ShowAll=Long
OK: NSClient++ (x64): startedAs of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Re: NSClient CheckServiceState issue
The support guys gave me the wrong server screenshot.Box293 wrote:I did some tests from the command line and it doesn't seem to have a problem with brackets
That example is using the service Display nameCode: Select all
[root@localhost libexec]# /usr/local/nagios/libexec/check_nrpe -H 192.168.1.128 -c CheckServiceState -a "NSClient++ (x64)" ShowAll=Long OK: NSClient++ (x64): started
In this server, the shortname was the same but Long Description was different.
Please close this ticket.
5 x Nagios 5.6.9 Enterprise Edition
RHEL 6 & 7
rrdcached & ramdisk optimisation
RHEL 6 & 7
rrdcached & ramdisk optimisation