Checking a log file from a current point in real time.
-
digitallife
- Posts: 27
- Joined: Mon Nov 17, 2014 12:29 pm
Re: Checking a log file from a current point in real time.
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.
-
digitallife
- Posts: 27
- Joined: Mon Nov 17, 2014 12:29 pm
Re: Checking a log file from a current point in real time.
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.
[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.
-
digitallife
- Posts: 27
- Joined: Mon Nov 17, 2014 12:29 pm
Re: Checking a log file from a current point in real time.
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
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.
Run:
then try using the plugin again. Let me know if this fixed your issue.
Code: Select all
yum install perl-Nagios-Plugin -yBe sure to check out our Knowledgebase for helpful articles and solutions!
-
digitallife
- Posts: 27
- Joined: Mon Nov 17, 2014 12:29 pm
Re: Checking a log file from a current point in real time.
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
-
digitallife
- Posts: 27
- Joined: Mon Nov 17, 2014 12:29 pm
Re: Checking a log file from a current point in real time.
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.
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!