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

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
digitallife
Posts: 27
Joined: Mon Nov 17, 2014 12:29 pm

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

Post 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.
digitallife
Posts: 27
Joined: Mon Nov 17, 2014 12:29 pm

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

Post 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.
digitallife
Posts: 27
Joined: Mon Nov 17, 2014 12:29 pm

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

Post 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
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

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

Post 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.
Be 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.

Post 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
digitallife
Posts: 27
Joined: Mon Nov 17, 2014 12:29 pm

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

Post by digitallife »

OK, I have configure the check in nagios and all appears to be working. Again, thanks for your help.
jolson
Attack Rabbit
Posts: 2560
Joined: Thu Feb 12, 2015 12:40 pm

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

Post 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!
Twits Blog
Show me a man who lives alone and has a perpetually clean kitchen, and 8 times out of 9 I'll show you a man with detestable spiritual qualities.
Locked