passing a $ to nagios

Morten Bekkelund morten.bekkelund at ergo.no
Wed Aug 30 12:19:03 CEST 2006


Hey.

I'm trying to monitor some mssql cluster services on windows.
MS obviously think its a good idea to use a $ as a separator in their
names. Ex: mssql$something
I'm having problems passing this to nagios. Tried several forms of
escaping, doubleescaping (with backslashes) and tried " and ' around the
commands both in services.cfg and commands.cfg but no luck as of yet.

I get different results in my output depending on how i use the " and '
and the escapechar. 
Seems nagios recognises the $something as a macro and gives it another $
in the output like this :  $something$ 
If i doubleescape i get : mssql\$ (nothing more)
If i singleescape i get : mssql$ (nothing more)
..regardless of my use of ' and " it seems.


Any clues how to pass this correctly to nagios? Thanks in advance.

Here's what the config looks like:

commands.cfg
------------
define command{
	command_name    check_nt_service
	command_line    $USER1$/check_nt -H $HOSTADDRESS$ -p 1248 -v
SERVICESTATE -l $ARG1$
}

services.cfg
------------
define service {
        use generic-service-bk
        service_description SQLPRD01 SQL Service
        check_command check_nt_service!mssql$sqlprd01
        freshness_threshold 600
        process_perf_data 0
        notifications_enabled 1
        hosts bkmvsql01i
        contact_groups bmk
}


-- 
Med vennlig hilsen,
Morten Bekkelund
Driftskonsulent
ErgoGroup AS
Nydalsveien 28
P.O.Box 4364 Nydalen
www.ergogroup.no

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null





More information about the Users mailing list