Page 3 of 4
Re: check_http perl script not working with SSL ?
Posted: Mon Jul 14, 2014 2:33 pm
by reinaldo.gomes
I did
Code: Select all
cd /tmp
wget https://github.com/nagios-plugins/nagios-plugins/archive/timeout_state.zip
unzip timeout_state
cd nagios-plugins-timeout_state
and then
Code: Select all
[root@localhost nagios-plugins-timeout_state]# ./tools/setup
which: no gnumake in (/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin:/root/root/bin)
Found GNU Make at /usr/bin/gmake ... good.
./tools/setup: line 30: aclocal: command not found
./tools/setup: line 32: autoheader: command not found
./tools/setup: line 33: automake: command not found
./tools/setup: line 34: autoconf: command not found
Re: check_http perl script not working with SSL ?
Posted: Mon Jul 14, 2014 2:41 pm
by abrist
You need to install the auomake package. If you are using centos:
For debian and friends:
Then try to recompile.
Re: check_http perl script not working with SSL ?
Posted: Mon Jul 14, 2014 2:53 pm
by reinaldo.gomes
I installed the automake and so I was able to run the ./tools/setup and then the ./configure
But I still got the same output when running check_http (timeout interval must be a positive integer).
Also, I got some error messages at the end of the compiling:
Code: Select all
Making all in plugins-root
make[2]: Entering directory `/tmp/nagios-plugins-timeout_state/plugins-root'
2.0.1.git
NP_VERSION = 2.0.1.git
make[2]: Leaving directory `/tmp/nagios-plugins-timeout_state/plugins-root'
make[2]: Entering directory `/tmp/nagios-plugins-timeout_state/plugins-root'
2.0.1.git
gcc -DLOCALEDIR=\"/usr/local/nagios/share/locale\" -DHAVE_CONFIG_H -I. -I.. -I.. -I../lib -I../gl -I../intl -I../plugins -I/usr/include -DNP_VERSION='"2.0.1.git"' -g -O2 -MT check_dhcp.o -MD -MP -MF .deps/check_dhcp.Tpo -c -o check_dhcp.o check_dhcp.c
mv -f .deps/check_dhcp.Tpo .deps/check_dhcp.Po
/bin/sh ../libtool --tag=CC --mode=link gcc -DNP_VERSION='"2.0.1.git"' -g -O2 -L. -o check_dhcp check_dhcp.o ../plugins/netutils.o ../plugins/utils.o ../lib/libnagiosplug.a ../gl/libgnu.a -lnsl -lresolv -lpthread -ldl
libtool: link: gcc -DNP_VERSION=\"2.0.1.git\" -g -O2 -o check_dhcp check_dhcp.o ../plugins/netutils.o ../plugins/utils.o -L. ../lib/libnagiosplug.a ../gl/libgnu.a -lnsl -lresolv -lpthread -ldl
gcc -DLOCALEDIR=\"/usr/local/nagios/share/locale\" -DHAVE_CONFIG_H -I. -I.. -I.. -I../lib -I../gl -I../intl -I../plugins -I/usr/include -DNP_VERSION='"2.0.1.git"' -g -O2 -MT check_icmp.o -MD -MP -MF .deps/check_icmp.Tpo -c -o check_icmp.o check_icmp.c
mv -f .deps/check_icmp.Tpo .deps/check_icmp.Po
/bin/sh ../libtool --tag=CC --mode=link gcc -DNP_VERSION='"2.0.1.git"' -g -O2 -L. -o check_icmp check_icmp.o ../plugins/netutils.o ../plugins/utils.o ../lib/libnagiosplug.a ../gl/libgnu.a -lnsl -lresolv -lnsl -lresolv -lpthread -ldl
libtool: link: gcc -DNP_VERSION=\"2.0.1.git\" -g -O2 -o check_icmp check_icmp.o ../plugins/netutils.o ../plugins/utils.o -L. ../lib/libnagiosplug.a ../gl/libgnu.a -lnsl -lresolv -lpthread -ldl
make[2]: Leaving directory `/tmp/nagios-plugins-timeout_state/plugins-root'
Making all in po
make[2]: Entering directory `/tmp/nagios-plugins-timeout_state/po'
test ! -f ./nagios-plugins.pot || \
test -z "fr.gmo de.gmo" || make fr.gmo de.gmo
make[3]: Entering directory `/tmp/nagios-plugins-timeout_state/po'
rm -f fr.gmo && : -c --statistics -o fr.gmo fr.po
mv: cannot stat `t-fr.gmo': No such file or directory
make[3]: *** [fr.gmo] Error 1
make[3]: Leaving directory `/tmp/nagios-plugins-timeout_state/po'
make[2]: *** [stamp-po] Error 2
make[2]: Leaving directory `/tmp/nagios-plugins-timeout_state/po'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/tmp/nagios-plugins-timeout_state'
make: *** [all] Error 2
Re: check_http perl script not working with SSL ?
Posted: Mon Jul 14, 2014 2:58 pm
by abrist
The compile failed too early. You are also missing the package "gettext":
Or:
Rerun the configure, make, and make install steps afterwards.
Re: check_http perl script not working with SSL ?
Posted: Mon Jul 14, 2014 3:19 pm
by reinaldo.gomes
after installing gettext I did this again:
Code: Select all
./tools/setup
./configure
make
make all
this time with no errors:
Code: Select all
make[2]: Entering directory `/tmp/nagios-plugins-timeout_state/po'
test ! -f ./nagios-plugins.pot || \
test -z "fr.gmo de.gmo" || make fr.gmo de.gmo
make[3]: Entering directory `/tmp/nagios-plugins-timeout_state/po'
rm -f fr.gmo && /usr/bin/msgfmt -c --statistics -o fr.gmo fr.po
844 translated messages, 3 fuzzy translations, 397 untranslated messages.
rm -f de.gmo && /usr/bin/msgfmt -c --statistics -o de.gmo de.po
87 translated messages, 163 fuzzy translations, 994 untranslated messages.
make[3]: Leaving directory `/tmp/nagios-plugins-timeout_state/po'
touch stamp-po
make[2]: Leaving directory `/tmp/nagios-plugins-timeout_state/po'
make[2]: Entering directory `/tmp/nagios-plugins-timeout_state'
make[2]: Leaving directory `/tmp/nagios-plugins-timeout_state'
make[1]: Leaving directory `/tmp/nagios-plugins-timeout_state'
but still getting the 'positive integer needed' message from check_http.
Re: check_http perl script not working with SSL ?
Posted: Mon Jul 14, 2014 4:21 pm
by abrist
My bad. My last post said "make all" instead of "make install". And I edited it, so no, you are not going crazy. At least not *this* time

Re: check_http perl script not working with SSL ?
Posted: Mon Jul 14, 2014 4:28 pm
by sreinhardt
I didn't see a "make install" there, which would leave the plugins built but still in the install directory and the original check_http still in place. So you have two choices.
1) move back into the directory where you were building the plugins and run make install. Then test from your standard plugins path.
2) test the new binaries from the path where you currently have them (we'll use /tmp) with something like:
cd /tmp/nagios-plugins-timeout_state/plugins
check_http -V ( to check the current version, should be 2.0.3-dirty or something similar)
I would suggest option 1, since you will in all likely-hood want to switch to the newer plugins anyway.
Re: check_http perl script not working with SSL ?
Posted: Mon Jul 14, 2014 4:39 pm
by reinaldo.gomes
Finally, now it works.
Just to make things clear: using the wrapped 2.0.3 version, I had a specific "CRITICAL - Socket timeout" string, so this was the only timeout message meant to return UNKNOWN state instead of CRITICAL.
Now, with the git's 2.0.1, all timeout-related messages will return UNKNOWN state instead of CRITICAL, right?
Re: check_http perl script not working with SSL ?
Posted: Tue Jul 15, 2014 9:48 am
by abrist
Timeouts, by default will still return a CRITICAL. But using the timeout syntax, you can set those checks to return UNKNOWN on timeout:
Code: Select all
./check_http localhost -t :unknown
Even though the plugins report version 2.0.1, they are indeed a different branch (and have had commits post 2.0.1 merged into them). These changes will be pulled into the nagios-plugins master branch at some point.
Re: check_http perl script not working with SSL ?
Posted: Tue Jul 15, 2014 11:14 am
by reinaldo.gomes
abrist wrote:Timeouts, by default will still return a CRITICAL. But using the timeout syntax, you can set those checks to return UNKNOWN on timeout
That's what I meant, thank you.
How do I know when Git's changes are commited to the master branch?