Page 2 of 2

Re: Nagios XI Service warning because of service name ...

Posted: Mon Nov 24, 2014 12:14 pm
by PhilG
Box293 wrote:
PhilG wrote:check_xi_service_nsclient!<pass>!SERVICESTATE!-l GxEvMgrC(Instance001) -d SHOWALL
check_xi_service_nsclient!<pass>!SERVICESTATE!-l GxCVD(Instance001) -d SHOWALL
check_xi_service_nsclient!<pass>!SERVICESTATE!-l MSSQLFDLauncher$UWCX01 -d SHOWALL
check_xi_service_nsclient!<pass>!SERVICESTATE!-l MSSQL$UWCX01 -d SHOWALL
The brackets and $ signs need to be escaped with a backslash '\'.

Code: Select all

check_xi_service_nsclient!<pass>!SERVICESTATE!-l GxEvMgrC\(Instance001\) -d SHOWALL
check_xi_service_nsclient!<pass>!SERVICESTATE!-l GxCVD\(Instance001\) -d SHOWALL
check_xi_service_nsclient!<pass>!SERVICESTATE!-l MSSQLFDLauncher\$UWCX01 -d SHOWALL
check_xi_service_nsclient!<pass>!SERVICESTATE!-l MSSQL\$UWCX01 -d SHOWALL


How about Services that have spaces in them, ex. "BMC FootPrints Asset Core Agent". I would have to add a backslash in front of each space then or are spaces acceptable and don't require the escape character?

Re: Nagios XI Service warning because of service name ...

Posted: Mon Nov 24, 2014 12:38 pm
by lmiltchev
Usually, wrapping the service name in double quotes is sufficient, for example:

Code: Select all

./check_nt -H 192.168.x.x -s password -p 12489 -v SERVICESTATE -l "Group Policy Client" -d SHOWALL
 Group Policy Client: Started
BTW, did you check to see if there is a "friendlier" name that you can use in your check (i.e. "Service name" vs "Display name")? I mean, is there an option where there are no spaces/special characters in the name?

Right-click on the service under "Services" on the Windows box, then click on "Properties".

Re: Nagios XI Service warning because of service name ...

Posted: Mon Nov 24, 2014 2:44 pm
by PhilG
lmiltchev wrote:Usually, wrapping the service name in double quotes is sufficient, for example:

Code: Select all

./check_nt -H 192.168.x.x -s password -p 12489 -v SERVICESTATE -l "Group Policy Client" -d SHOWALL
 Group Policy Client: Started
BTW, did you check to see if there is a "friendlier" name that you can use in your check (i.e. "Service name" vs "Display name")? I mean, is there an option where there are no spaces/special characters in the name?

Right-click on the service under "Services" on the Windows box, then click on "Properties".
Yes, that's the first thing I did was identify the actual Service Name. The vendor chose to be "non-standard" for some reason, ex.
Service name: GxEvMgrC(Instance001)
Display name: CommVault Client Event Manager (Instance001)
Path to executable: "C:\Program Files\CommVault\Simpana\Base\evmgrc.exe" -vm Instance001

I can probably find the Process name "evmgrc.exe" and use that instead of doing a Service Name check.

BTW, "gpsvc" is the Service name of the Display name "Group Policy Client".

Re: Nagios XI Service warning because of service name ...

Posted: Mon Nov 24, 2014 5:09 pm
by lmiltchev
I see. Try:

Code: Select all

 ./check_nt -H <client ip> -s <password> -p 12489 -v PROCSTATE -l evmgrc.exe -d SHOWALL
Let us know how it went.

Re: Nagios XI Service warning because of service name ...

Posted: Wed Nov 26, 2014 12:56 pm
by PhilG
lmiltchev wrote:I see. Try:

Code: Select all

 ./check_nt -H <client ip> -s <password> -p 12489 -v PROCSTATE -l evmgrc.exe -d SHOWALL
Let us know how it went.

I didn't have time to get to this today and I will be out of the office until Mon. 12/1/2014. I will say that the backslash did work for one of the Services that had the "$" character.

Re: Nagios XI Service warning because of service name ...

Posted: Wed Nov 26, 2014 1:05 pm
by lmiltchev
Sounds good! Post back on Monday to give us an update.

Re: Nagios XI Service warning because of service name ...

Posted: Sun Nov 30, 2014 1:01 pm
by PhilG
Update:
1). Windows Service Names that contain spaces are being monitored successfully at this time. I enclosed the service name with the double quotations (as was suggested), ex.
"Stupid Long Windows Service Name From Vendor That Uses Spaces"

2). Windows Service Names that contain a special character, ex. a "$", are being successfully monitored at this time. I have preceded the special character with the escape character "\", as was suggested, ex. (without the double quotations):
"StupedWindowsServiceName\$WithSpecialCharacter"

Thank you for your assistance! You may freeze this post.

Re: Nagios XI Service warning because of service name ...

Posted: Mon Dec 01, 2014 11:51 am
by cmerchant
We'll go ahead and close this thread for you. Thanks.