AW: Monitoring Windows Event Log from Nagios

Greg King wgking at shaw.ca
Tue Sep 21 01:51:52 CEST 2004


I solved the embedded perl problem by encapulating the perl script inside a shell script. Here's the code that works for me:

[root at z3 libexec]# cat check_win_eventlog.sh
#!/bin/bash
/usr/bin/perl -w /usr/local/nagios/libexec/check_win_eventlog.pl $1 $2 $3 $4 $5
$6 $7 $8
exit $?

Then change the nagios command to call the shell script (check_win_eventlog.sh) instead of the perl script. This seems to bypass the broken embedded perl interpreter of Nagios.

Regards, 
Greg King


----- Original Message -----
From: Greg King <wgking at shaw.ca>
Date: Saturday, August 21, 2004 11:54 pm
Subject: RE: AW: Monitoring Windows Event Log from Nagios   

> Hi list,
> 
> Environment: RH9, Nagios 1.2 from DAG RPMs.
> 
> I have installed the windows event monitor of Naplax and it works 
> fine from the command line as either the Nagios user or root, but 
> when I try it as a Nagios service, I get service critical with "no 
> output!". I have added the "-w" option to the perl command line and 
> cleaned up some minor warning messages, but it still refuses to 
> work inside Nagios, but runs fine on the command line.  I suspect 
> this is the embedded perl working differently from "normal" perl. 
> 
> Is there a way to "turn off" embedded perl without recompiling Nagios?
> How would one go about debugging the embedded perl?
> 
> Regards,
> Greg King 
> -----------------------
> From: Schaffranneck, Sven (K-DOI-5/4) <sven at vo...>
> AW: Monitoring Windows Event Log from Nagios   
> 2004-05-11 23:27  
> Hi Steve,
> 
> > Does anyone out there have a method to monitor the Windows 
> > Event log using
> > Nagios?
> 
> have a look at 
> http://naplax.sourceforge.net/check_win_eventlog.html for
> NAPLAX and it"s Windows Eventlog Addon.
> 
> Poorly it doesn"t support the embedded Perl Nagios and the author 
> doesn"t know how to change the perl-script to work with ePN. Maybe 
> anyone else want
> this!? :-)
> 
> Greets Sven
> 
> 
> 
> 



-------------------------------------------------------
This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170
Project Admins to receive an Apple iPod Mini FREE for your judgement on
who ports your project to Linux PPC the best. Sponsored by IBM.
Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php
_______________________________________________
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