escaping $ signs
Anthony Montibello
amontibello at gmail.com
Tue May 31 12:53:32 CEST 2005
You can check this service using NC_Net.
I tested this from both the command line and from nagios.
the double $$ did not work with NC_NEt but \$ did
from command line:
-v SERVICESTATE -l "MSSQL$$BKUPEXEC"
MSSQL14962BKUPEXEC: Unknown
-v SERVICESTATE -l "MSSQL\$BKUPEXEC"
All services are running
-v SERVICESTATE -l "MSSQL\$BKUPEXEC" -d SHOWALL
MSSQL$BKUPEXEC: Started
>From Nagios I used the following Command/Configuration.
check_command check_nc_net_with_l_d!SERVICESTATE!MSSQL\$BKUPEXEC!SHOWALL
define command{
command_name check_nc_net_with_l_d
command_line $USER1$/check_nt -H $HOSTADDRESS$ -p 1248 -v $ARG1$ -l
"$ARG2$" -d $ARG3$
}
On 5/27/05, HP Geeza <getbacktome3 at hotmail.com> wrote:
> Hi
>
> Does anybody know how to escape $ signs in service definitions??? I still
> haven't managed to crack this....here's what i am trying to do.
>
> I have a service definition:
> # Service definition
> define service
> {
> use generic-service ; Name of
> service template to use
> host_name winbackupServer
> service_description SQLAgent BKUPEXEC
> check_command
> check_nt_service!"SQLAgent\$BKUPEXEC"
> }
>
>
> Here's my command definition:
> # 'check_nt_ntservice' command definition
> define command
> {
> command_name check_nt_service
> command_line $USER1$/check_nt -H $HOSTADDRESS$ -p 1248 -v
> SERVICESTATE -l $ARG1$
> }
>
>
> BUT THE STATUS DEFINITION FOR THIS HOST COMES UP WITH:
> SQLAgent$BKUPEXEC$: Unknown
>
> The nt service which i am trying to monitor is SQLAgent$BKUPEXEC
>
> ANY HELP WOULD BE MUCH APPRECIATED
>
> _________________________________________________________________
> Be the first to hear what's new at MSN - sign up to our free newsletters!
> http://www.msn.co.uk/newsletters
>
>
>
> -------------------------------------------------------
> This SF.Net email is sponsored by Yahoo.
> Introducing Yahoo! Search Developer Network - Create apps using Yahoo!
> Search APIs Find out how you can build Yahoo! directly into your own
> Applications - visit http://developer.yahoo.net/?fr=offad-ysdn-ostg-q22005
> _______________________________________________
> 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
>
-------------------------------------------------------
This SF.Net email is sponsored by Yahoo.
Introducing Yahoo! Search Developer Network - Create apps using Yahoo!
Search APIs Find out how you can build Yahoo! directly into your own
Applications - visit http://developer.yahoo.net/?fr=offad-ysdn-ostg-q22005
_______________________________________________
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