check_log2.pl perl module

Terry L. Inzauro tinzauro at ha-solutions.net
Fri Mar 24 20:08:08 CET 2006


Arno Lehmann wrote:
> Hello,
> 
> On 3/24/2006 5:11 PM, Terry L. Inzauro wrote:
>> Marc Powell wrote:
> ...
>>> 1) Always run your tests as the nagios user.
>>>
>>> 2) They're harmless notices sent to STDERR, not STDOUT so nagios
>>> wouldn't ever seen them but you shouldn't be seeing them either with an
>>> unmodified plugin.
>>>
>>> 3) What version of the plugins are you using? I don't see these with 1.4
>>> -- 
>>>
>>> [nagios at noctools libexec]$ ./check_log2.pl -l /var/log/messages -s
>>> /tmp/seekfile -p Error
>>> OK - No matches found.
>>>
>>> 4) Did you modify the shebang line in the script to turn on syntax
>>> checks (i.e. #!/usr/bin/perl -cw). I can reproduce your results if I do
>>> that --
> ...
>> ok, i modified the shebang and all works without warnings.  thanks a 
>> bunch.  but i still haven't fingered out why i need to alter @INC.
> 
> Because the check_.* programs expect to be called in the path where all 
> the plugins reside, usually /usr/local/nagios/libexec. The utils.pm file 
> must be in that same directory - if it isn't, you should copy it there. 
> If there isn't a utils.pm file, the plugins installation is probably 
> broken.
> 
>>  see the following output.
> 
> The following is expressly _not_ run in the libexec directory - you 
> cd'ed out of it yourself :-)
> 
> Arno
> 
>>  as you can see "." is in @INC.  you'd think i wouldn't have to 
>> explicitly add the full path to get it to work. in any event, i'm ok 
>> with the small tweak...for now;)
>>
>>
>> jenna contrib # cd /usr/nagios/libexec/contrib/
>> jenna contrib # perl -le 'print join("\n", at INC);'
>> /etc/perl
>> /usr/lib/perl5/site_perl/5.8.6/i386-linux
>> /usr/lib/perl5/site_perl/5.8.6
>> /usr/lib/perl5/site_perl
>> /usr/lib/perl5/vendor_perl/5.8.6/i386-linux
>> /usr/lib/perl5/vendor_perl/5.8.6
>> /usr/lib/perl5/vendor_perl
>> /usr/lib/perl5/5.8.6/i386-linux
>> /usr/lib/perl5/5.8.6
>> /usr/local/lib/site_perl
>> .
>> jenna contrib # ./check_log2.pl
>> Can't locate utils.pm in @INC (@INC contains: . /etc/perl 
>> /usr/lib/perl5/site_perl/5.8.6/i386-linux 
>> /usr/lib/perl5/site_perl/5.8.6 /usr/lib/perl5/site_perl 
>> /usr/lib/perl5/vendor_perl/5.8.6/i386-linux 
>> /usr/lib/perl5/vendor_perl/5.8.6 /usr/lib/perl5/vendor_perl 
>> /usr/lib/perl5/5.8.6/i386-linux /usr/lib/perl5/5.8.6 
>> /usr/local/lib/site_perl) at ./check_log2.pl line 65.
>> BEGIN failed--compilation aborted at ./check_log2.pl line 65.
>>
>>
>> thank you for your assistance and have a good weekend.
>>
>>
>>
>>
>> -------------------------------------------------------
>> This SF.Net email is sponsored by xPML, a groundbreaking scripting 
>> language
>> that extends applications into web and mobile media. Attend the live 
>> webcast
>> and join the prime developer group breaking into this new coding 
>> territory!
>> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&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
>>
> 


indeed i did.  sometime you can't see the trees through the forest ;)

thanks.

jenna libexec # cd /usr/nagios/libexec/
jenna libexec # contrib/check_log2.pl
Log file not specified.
jenna libexec #

sorry for the rookie mistake.


_Terry






-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&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