This support forum board is for support questions relating to
Nagios XI , our flagship commercial network monitoring solution.
gselvakumar
Posts: 96 Joined: Wed Mar 02, 2016 4:52 am
Post
by gselvakumar » Wed Sep 28, 2016 4:32 am
While trying to execute check_logfiles in command line we get the following error ,
Code: Select all
/usr/local/nagios/libexec/check_logfiles-2.3.1.2/plugins-scripts/check_logfiles --logfile=/tmp/messages --criticalpattern='FAIL|CRITICAL'
Can't use string ("0") as an ARRAY ref while "strict refs" in use at /usr/local/nagios/libexec/check_logfiles-2.3.1.2/plugins-scripts/check_logfiles line 1568.
Could you please advise of the issue. Thank you.
Thanks & Regards,
Gomathyshankar Selvakumar
rkennedy
Posts: 6579 Joined: Mon Oct 05, 2015 11:45 am
Post
by rkennedy » Wed Sep 28, 2016 10:09 am
Perhaps it's worth updating to a newer version? I just tested this on my end and it worked without issues. I'm using 3.7.4.2 though.
Code: Select all
[root@localhost libexec]# wget https://labs.consol.de/assets/downloads/nagios/check_logfiles-3.7.4.2.tar.gz
[root@localhost libexec]# tar zxf check_logfiles-3.7.4.2.tar.gz
[root@localhost libexec]# cd check_logfiles-3.7.4.2
[root@localhost check_logfiles-3.7.4.2]# ./configure
[root@localhost check_logfiles-3.7.4.2]# ./make
[root@localhost check_logfiles-3.7.4.2]# ./make install
[root@localhost check_logfiles-3.7.4.2]# cd plugins-scripts/
[root@localhost plugins-scripts]# ./check_logfiles --logfile=/var/log/messages --criticalpattern='FAIL|CRITICAL'
OK - no errors or warnings|default_lines=0 default_warnings=0 default_criticals=0 default_unknowns=0
[root@localhost plugins-scripts]# ./check_logfiles --logfile=/tmp/messages --criticalpattern='FAIL|CRITICAL'
UNKNOWN - (1 unknown in check_logfiles.protocol-2016-09-28-11-07-05) - could not find logfile /tmp/messages |default_lines=0 default_warnings=0 default_criticals=0 default_unknowns=1
Could you try this, and let us know if that works for you?
Former Nagios Employee
gselvakumar
Posts: 96 Joined: Wed Mar 02, 2016 4:52 am
Post
by gselvakumar » Thu Sep 29, 2016 4:06 am
Hi rkennedy,
Thank you so much for the update. The new version of plugin works. We are able to see the required output.
Code: Select all
./check_logfiles --logfile=/tmp/messages --criticalpattern='FAIL|CRITICAL'
CRITICAL - (1 errors in check_logfiles.protocol-2016-09-29-04-03-04) - FAIL |default_lines=3 default_warnings=0 default_criticals=1 default_unknowns=0
Thanks & Regards,
Gomathyshankar Selvakumar
avandemore
Posts: 1597 Joined: Tue Sep 27, 2016 4:57 pm
Post
by avandemore » Thu Sep 29, 2016 12:07 pm
Perfect! I'm closing this thread since you have resolved your issue. Thanks for being part of the Nagios Community.
Previous Nagios employee