Page 2 of 2

Re: Checking a log file from a current point in real time.

Posted: Wed Mar 18, 2015 7:39 pm
by digitallife
This is very interesting. I execute the check_file_content.pl, which as you can see, is too a perl script, and it runs just fine. However, I will definitely try the ,. Thanks again. I will let you know.

Re: Checking a log file from a current point in real time.

Posted: Wed Mar 18, 2015 7:51 pm
by digitallife
OK, there is something else going on here. Looks like I'm missing a file.

[root@nagios libexec]# perl check_events.pl -L /tmp/log.test2 -D "utility power failure" -U "utility power restored"
Can't locate Nagios/Plugin.pm in @INC (@INC contains: /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 .) at check_events.pl line 8.
BEGIN failed--compilation aborted at check_events.pl line 8.

I'm not sure what this is.

Re: Checking a log file from a current point in real time.

Posted: Thu Mar 19, 2015 10:24 am
by digitallife
I actually tried running it via Nagios and it appeared to run. However, I got the following error:

New_log_parsing Unknown 28m 9s 5/5 19/03/2015 11:14:18 NRPE: Unable to read output

I've attached the view from Nagios gui.

Any helpful ideas to fix this issue will be greatly appreciated.

Thanks

Re: Checking a log file from a current point in real time.

Posted: Thu Mar 19, 2015 11:33 am
by lmiltchev
Run:

Code: Select all

yum install perl-Nagios-Plugin -y
then try using the plugin again. Let me know if this fixed your issue.

Re: Checking a log file from a current point in real time.

Posted: Thu Mar 19, 2015 12:46 pm
by digitallife
Great news. I think that Yum update did the trick. I'm able to execute the script now with "perl" on the server. I will play with it there then configure it in nagios. Thanks for your help

Re: Checking a log file from a current point in real time.

Posted: Thu Mar 19, 2015 1:07 pm
by digitallife
OK, I have configure the check in nagios and all appears to be working. Again, thanks for your help.

Re: Checking a log file from a current point in real time.

Posted: Thu Mar 19, 2015 2:16 pm
by jolson
That is great to hear - would it be alright if this thread was closed? I just want to make sure that there are no loose ends that we could help you with. Thanks!