[Nagiosplug-devel] FW: SERVICESTATE fails with $ imbedded inregistry name

Mike Lindsey mike-nagios at 5dninja.net
Tue Aug 30 22:51:55 CEST 2011


On 8/30/11 11:13 AM, Nygren, Ray wrote:
>
> Version 3.2.3 nagios debian linux and plugins 1.4.15
>
> Micorsoft puts a $ in the SQL server services but your code truncates 
> the service registry name after the $
>
> check_command           check_nt!SERVICESTATE! -d SHOWALL -l MSSQL$HEMS
>
> returns service not found MSSQL$
>
> Is there any solution? I tried single quotes, double quotes, \ and 
> back tick with same error
>
> I even renamed the service without $ and still no go.(Not display name 
> but registry name)
>
>
Try double $$.  $ is a special character for both Nagios, and most 
likely, your shell.  So, you should escape it for Nagios, by adding a 
second dollar sign.  You should also include the whole last bit in 
single quotes.

ie:

check_command      check_nt!SERVICESTATE!-d SHOWALL -l 'MSSQL$HEMS'

-- 
Mike Lindsey

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-plugins.org/archive/devel/attachments/20110830/1fddb2dc/attachment.html>


More information about the Devel mailing list