Greg,

Try enabling the following:

;# COMMAND ALLOW NASTY META CHARS
;  This option determines whether or not the NRPE daemon will allow clients to 
specify nasty (as in |`&><'"\[]{}) characters in arguments.
allow_nasty_meta_chars=1

and sending \\ instead of just \ when you send the NRPE command

The following I use to check the size of exch database file sizes:
check_nrpe -H $HOSTADDRESS$ -p 5666 -c CheckFileSize -a MaxWarn=10M MaxCrit=50M 
File:"pub1.edb"="S:\\EXCHSRVR\\mdbdata\\pub1.edb" ShowAll

Matt White | Escalation Engineer

Wavex Technology Limited
10 Livonia Street
London
W1F 8AF
T  +44 (0) 845 226 8182
F  +44 (0) 845 838 6870

E [email protected]
W http://www.wavex.co.uk

Support | Training | Advice | Security | Disaster Recovery | Monitoring | 
Business Intelligence | On-line Backup | Telephony | Hosting | Virtualisation | 
Remote Working

This email and its attachments may be confidential and are intended solely for 
the use of the individual to whom it is addressed. Unless otherwise indicated, 
any views or opinions expressed are solely those of the author and do not 
necessarily represent those of Wavex Technology Limited. If you are not the 
intended recipient of this email and its attachments, you must take no action 
based upon them, nor must you copy or show them to anyone. The use of this 
information or any disclosure, copying or distribution is prohibited and may be 
unlawful. No confidentiality or privilege is waived or lost by any mistaken 
transmission. If you believe you have received this email in error then please 
contact the sender and delete this email and its attachments. Wavex recommends 
that all emails received by this recipient are scanned appropriately for 
viruses. Wavex Technology Limited is registered in England & Wales with the 
registered number 4258498. The Company's principal place of business, and 
registered office, is 10 Livonia Street, London, W1F 8AF.
-----Original Message-----
From: [email protected] 
[mailto:[email protected]] On Behalf Of Greg Fishback
Sent: 23 June 2010 17:01
To: 'Opsview Users'
Subject: Re: [opsview-users] (no subject)

Yep, kind of what I expected.  When I put 
   check_file_age=cscript.exe scripts\check_file_age.vbs -f
"c:\temp\test.txt" -w 1 -c 3
in the NCS.ini file and then run ./check_nrpe -H hostname -c check_file_age
from the linux prompt I get the appropriate respons.  In this case,
"WARNING".  When I  replace the NCS.ini entry with 
   check_file_age=cscript.exe scripts\check_file_age.vbs $ARG1$
and then run 
   ./check_nrpe -H computername -c check_file_age -f "c:\temp\test.txt" -w 1
-c 3
It returns nothing.  Just getting the "\" character involved me using the
extended ascii code and on my keyboard the @ and " (quote) files were
swapped.  Obviously the argument string is not arriving correctly at the
client machine.

Greg  

-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Natxo Asenjo
Sent: Tuesday, June 22, 2010 12:15 PM
To: Opsview Users
Subject: Re: [opsview-users] (no subject)

On Tue, Jun 22, 2010 at 8:08 PM, Greg Fishback <[email protected]> wrote:
> So what am I doing wrong here....
> When I execute
>
>   "cscript.exe scripts\check_file_age.vbs -f "c:\temp\test.txt" -w 1 -c 3"
>
> from the command line, it returns OK or Error but when I put

ok

>   "check_file_age=cscript.exe scripts\check_file_age.vbs $ARG1$"

for testing, just replace that with:

check_file_age=cscript.exe scripts\check_file_age.vbs -f
"c:\temp\test.txt" -w 1 -c 3

and reload the nsclient service in the windows server. From the
opsview server, in order to test quickly without having to reload the
web interface, what I do is in a command prompt (shell) run the plugin
by hand. I assume you have a windows workstation, so you start putty
and login the opsview server. You go to the plugins directory:

# cd /usr/local/nagios/libexec

# ./check_nrpe -H hostname -c check_file_age

the swith -H is for the host, and -c for the remote command to be
executed on that host. The command name must exactly be the same you
defined in nsc.ini. If all goes well then you go to the next step
which is define the check in the web ui of opsview.

-- 
natxo
_______________________________________________
Opsview-users mailing list
[email protected]
http://lists.opsview.org/lists/listinfo/opsview-users


_______________________________________________
Opsview-users mailing list
[email protected]
http://lists.opsview.org/lists/listinfo/opsview-users
_______________________________________________
Opsview-users mailing list
[email protected]
http://lists.opsview.org/lists/listinfo/opsview-users

Reply via email to