monitor windows service with "$"
DE/HAM Hoppe, Leif
Leif.Hoppe at hartrodt.com
Thu Oct 8 10:34:07 CEST 2009
\$DB works for me in the shell.
When I try to check "service$$DB" in nagios now, I get: "Status Information: service: Not found"
So he ignores everything after and including the $.
Idea?
-----Original Message-----
From: Marc Powell [mailto:marc at ena.com]
Sent: Mittwoch, 7. Oktober 2009 17:04
To: Nagios Users
Subject: Re: [Nagios-users] monitor windows service with "$"
On Oct 7, 2009, at 9:47 AM, Spook ZA wrote:
>>> nagios at nagios:~> /usr/local/nagios/libexec/check_nt -H 10.2.30.190
>>> -p 12489 -v SERVICESTATE -l "service$DB"
>>> service: Not found
>>>
> I did an dirty hack / wrapper to get round this problem.
You didn't need to AFAIK.
> I called it: /usr/lib64/nagios/plugins/msauxdb.sh and used it to check
> things like MSSQL$BKUPEXEC
> Nagios uses $ to interpret arguments to commands.
Note that he's running this from the shell directly. Nagios isn't
doing anything to it at all; no macro parsing etc... To prevent nagios
from trying to parse the $ as the start of a macro from within the
command{} definition, use $$ ('service$$DB' or 'MSSQL$$BKUPEXEC' in
your case).
--
Marc
------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
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
------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
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