Page 1 of 3
Nagio plugin installation error
Posted: Wed Apr 30, 2014 5:29 am
by marcobto58
Hi
During make process in nagios plugins 2.0.1 installation i get this error:
...
...
NP_VERSION=2.0.1 mawk -f ./subst check_mailq.pl > check_mailq
mawk: run time error: regular expression compile failed (missing operand)
/var/lib/postfix' || -d '/var/local/lib/postfix
FILENAME="check_mailq.pl" FNR=613 NR=613
make[2]: *** [check_mailq] Error 2
make[2]: Leaving directory `/root/nagios/nagios-plugins-2.0.1/plugins-scripts'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/root/nagios/nagios-plugins-2.0.1'
make: *** [all] Error 2
have you any suggest?
My environment:
UBUNTU 14.04 LTS X86_64
Nagios core 4.0.6
Nagios plugin 2.0 (working)
postfix 2.11.0-1 amd64
Best ragards
Marco
Re: Nagio plugin installation error
Posted: Wed Apr 30, 2014 1:44 pm
by abrist
Looks like mawk thinks there is a regex where there is not. We may want to pull in the monitoring-plugins patchs for the odd awk magic:
https://github.com/monitoring-plugins/m ... 87472ee22f
In order to fix this (there may be a few others as well).
What version of awk/mawk are you using?
If you install GNU awk (gawk), is the issue resolved?
Re: Nagio plugin installation error
Posted: Thu May 01, 2014 8:56 am
by jangomes@gmail.com
Hi there,
I got the same problem with debian 7.5 ...
However, installing the gawk package the issue was solved.
Thanks.
Re: Nagio plugin installation error
Posted: Thu May 01, 2014 9:47 am
by tmcdonald
macrobto58, can you let us know if installing gawk helps?
Re: Nagio plugin installation error
Posted: Mon May 12, 2014 10:10 am
by tmcdonald
Actually, as mentioned in this thread:
http://support.nagios.com/forum/viewtop ... 730#p97730
You might have some erroneous lines in check_mailq that are throwing things off. Can you please run the following and post the output?
grep -C15 "exim4" /usr/local/nagios/libexec/check_mailq
Re: Nagio plugin installation error
Posted: Fri May 23, 2014 1:13 pm
by koffe
I had the same problem on Ubuntu 12.04.4, installing gawk helped. Thanks!
Re: Nagio plugin installation error
Posted: Fri May 23, 2014 1:56 pm
by lmiltchev
marcobto58,
can you let us know if installing gawk helped?
Re: Nagio plugin installation error
Posted: Sun Jun 01, 2014 9:01 pm
by hafiz
for debian wheezy you can try install gawk package by using this command
#apt-get install gawk:amd64 or
#apt-get install gawk:i386
depanding on your platform linux version either amd64 or i386
Re: Nagio plugin installation error
Posted: Mon Jun 02, 2014 9:40 am
by abrist
Marco, does installing gawk fix your issue?
Re: Nagio plugin installation error
Posted: Mon Jun 02, 2014 3:14 pm
by ydastous
Hello
Just try to install nagios-plugins 2.0.2 and I have the same issue, the check_mailq produce is not good perl. I am on RedHat 6.5 with the gawk package install and the check_mailq perl script is not good around line 613:
Code: Select all
607 }else{
608 if (defined $utils::PATH_TO_QMAIL_QSTAT
609 && -x $utils::PATH_TO_QMAIL_QSTAT)
610 {
611 $mailq = 'qmail';
612 }
613 /usr/sbin/postfix elsif (-d '/var/lib/postfix' || -d '/var/local/lib/postfix'
614 /usr/sbin/postfix || -e '/usr/sbin/postfix' || -e '/usr/local/sbin/postfix')
615 {
616 $mailq = 'postfix';
617 }
618 exim4 elsif (-d '/usr/lib/exim4' || -d '/usr/local/lib/exim4'
619 exim || -e '/usr/sbin/exim' || -e '/usr/local/sbin/exim')
620 {
621 $mailq = 'exim';
622 }
623 nullmailer elsif (-d '/usr/lib/nullmailer' || -d '/usr/local/lib/nullmailer'
624 || -e 'nullmailer-send'
625 || -e 'nullmailer-send')
626 {
627 $mailq = 'nullmailer';
628 }
629 else {
630 $mailq = 'sendmail';
631 }
632 }
633