passing a $ to nagios

rob.moss at uk.bnpparibas.com rob.moss at uk.bnpparibas.com
Wed Aug 30 12:24:20 CEST 2006


Use the double-dollar (as written in the docs)

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
}





Internet
morten.bekkelund at ergo.no@lists.sourceforge.net - 30/08/2006 11:19


Please respond to morten.bekkelund at ergo.no

Sent by:    nagios-users-bounces at lists.sourceforge.net



To:    nagios-users

cc:


Subject:    [Nagios-users] passing a $ to nagios

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
}




This message and any attachments (the "message") is 
intended solely for the addressees and is confidential. 
If you receive this message in error, please delete it and
immediately notify the sender. Any use not in accord with
its purpose, any dissemination or disclosure, either whole
or partial, is prohibited except formal approval. The internet
can not guarantee the integrity of this message.
BNP PARIBAS (and its subsidiaries) shall (will) not
therefore be liable for the message if modified. 

**********************************************************************************************

BNP Paribas Private Bank London Branch is authorised
by CECEI & AMF and is regulated by the Financial Services
Authority for the conduct of its investment business in
the United Kingdom.

BNP Paribas Securities Services London Branch is authorised 
by CECEI & AMF and is regulated by the Financial Services 
Authority for the conduct of its investment business in 
the United Kingdom.
  
BNP Paribas Fund Services UK Limited is authorised and 
regulated by the Financial Services Authority


-------------------------------------------------------------------------
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