``` $ /usr/lib/nagios/plugins/check_http -V check_http v2.1.1 (monitoring-plugins 2.1.1) ``` If we check an Apache 2.2 server under Debian Wheezy, all is OK. ``` $ /usr/lib/nagios/plugins/check_http -S -H $MYDOMAIN HTTP OK: HTTP/1.1 200 OK - 2481 bytes in 0.582 second response time |time=0.582011s;;;0.000000 size=2481B;;;0 ```
If we check an Apache 2.4 server under Debian Jessie, there is an odd bug. ``` $ /usr/lib/nagios/plugins/check_http -S -H $MYDOMAIN HTTP OK: HTTP/1.1 200 OK - 2392 bytes in 7.530 second response time |time=7.529691s;;;0.000000 size=2392B;;;0 $ /usr/bin/time curl https://$MYDOMAIN -k -o /dev/null -s 0.00user 0.00system 0:00.28elapsed 2%CPU (0avgtext+0avgdata 8828maxresident)k ``` Why it took 7+s where curl took 0.28s? The fact is check_http doesn't seems to speak the same HTTPS as curl. I traced Apache to see more informations. ``` 14:57:42 accept4(6, {sa_family=AF_INET6, sin6_port=htons(53216), inet_pton(AF_INET6, "::ffff:88.179.18.233", &sin6_addr), sin6_flowinfo =0, sin6_scope_id=0}, [28], SOCK_CLOEXEC) = 29 14:57:42 read(29, 0x7f7ddd36b048, 8000) = -1 EAGAIN (Resource temporarily unavailable) 14:57:42 poll([{fd=29, events=POLLIN}], 1, 7000) = 0 (Timeout) 14:57:49 close(29) = 0 ``` It took 7+s, because my Apache server has a Timeout of 7s. Apache seems to wait something from check_http, before timeout occurs. (You can set Apache timeout to 30s, check_http will take 30+s). An here comes the really odd part. ``` $ /usr/lib/nagios/plugins/check_http -S -H $MYDOMAIN -N HTTP OK: HTTP/1.1 200 OK - 256 bytes in 0.555 second response time |time=0.554783s;;;0.000000 size=256B;;;0 ``` With -N, all is OK. Any ideas? I opened the issue here because I have only this odd bug with check_http, not with curl, wget, browsers… It may be related to Apache, but that's quite odd. --- Reply to this email directly or view it on GitHub: https://github.com/monitoring-plugins/monitoring-plugins/issues/1358