Bug 1465784 - nagios http plugin is old and buggy
nagios http plugin is old and buggy
Status: CLOSED ERRATA
Product: Fedora EPEL
Classification: Fedora
Component: nagios-plugins (Show other bugs)
el6
Unspecified Linux
unspecified Severity unspecified
: ---
: ---
Assigned To: Stephen John Smoogen
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2017-06-28 04:01 EDT by Fabrice Bacchella
Modified: 2017-08-10 02:19 EDT (History)
9 users (show)

See Also:
Fixed In Version: nagios-plugins-2.2.1-3git.fc24 nagios-plugins-2.2.1-4git.fc26 nagios-plugins-2.2.1-4git.el7 nagios-plugins-2.2.1-3git.fc25 nagios-plugins-2.2.1-4git.el6
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2017-07-23 17:51:23 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Github 217 None None None 2017-06-28 04:01 EDT

  None (edit)
Description Fabrice Bacchella 2017-06-28 04:01:57 EDT
The nagios-plugins-http has a critical bug:
https://github.com/nagios-plugins/nagios-plugins/issues/217

One can test with:
/usr/lib64/nagios/plugins/check_http -H etreetracker1.ibiblio.org -p 6969 -u '/check' -e 'HTTP/1.1 200 OK' -s 'OK' -w 10 -c 60

It's resolved since march. Now 2.2.1-1.el6 is in epel-testing.
Changelog shows:
* Thu Apr 20 2017 Stephen Smoogen <smooge@fedoraproject.org> - 2.2.1-1
- New version of plugins. Remove old patches

So it's stuck in testing for 2 month. Any hope to see it in main repo ?
Comment 1 Stephen John Smoogen 2017-06-28 09:54:26 EDT
It is waiting for feedback from users. I get a lot of people saying "It is stuck in testing..." but no feedback on whether it is working there or not.

Can you test it and see if it fixes the problems and does not introduce anything new? Thank you.
Comment 2 Fabrice Bacchella 2017-06-28 11:26:44 EDT
Just tested on a Scientific Linux release 6.9:

lsb_release -a
LSB Version:	:base-4.0-amd64:base-4.0-ia32:base-4.0-noarch:core-4.0-amd64:core-4.0-ia32:core-4.0-noarch:graphics-4.0-amd64:graphics-4.0-ia32:graphics-4.0-noarch:printing-4.0-amd64:printing-4.0-ia32:printing-4.0-noarch
Distributor ID:	Scientific
Description:	Scientific Linux release 6.9 (Carbon)
Release:	6.9
Codename:	Carbon

sudo yum --enablerepo=epel-testing install nagios-plugins-http
...
Installed:
  nagios-plugins-http.x86_64 0:2.2.1-1.el6                                                                                                                        

Dependency Updated:
  nagios-plugins.x86_64 0:2.2.1-1.el6                                           nagios-plugins-disk.x86_64 0:2.2.1-1.el6                                          

~$ /usr/lib64/nagios/plugins/check_http -H etreetracker1.ibiblio.org -p 6969 -u '/check' -e 'HTTP/1.1 200 OK' -s 'OK' -w 10 -c 60
HTTP OK: Status line output matched "HTTP/1.1 200 OK" - HTTP/1.1 200 OK - 199 bytes in 0.535 second response time |time=0.534873s;10.000000;60.000000;0.000000 size=199B;;;0

So it's ok for me.
Comment 3 Fedora Update System 2017-07-03 16:54:19 EDT
nagios-plugins-2.2.1-2git.el7 has been submitted as an update to Fedora EPEL 7. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2017-cc0aeaca30
Comment 4 Ion Badulescu 2017-07-05 21:00:59 EDT
The check_http plugin that came with the latest update (nagios-plugins-http-2.2.1-1.el6.x86_64) is busted. It connects, gets the string it wants, closes the connection, then spins (100% cpu) until its timeout expires and returns "CRITICAL - Socket timeout". It doesn't matter if I use GET or HEAD. Also nothing changes if I run it against a server that returns 200 instead of 401.

Here's the strace -r -s 256 for the broken plugin, and note the 9.998757 seconds of spin time between close and SIGALRM:

# strace -s 256 -r /usr/lib64/nagios/plugins/check_http -H xxxx.yyyy.com -I 10.0.60.11 -e 'HTTP/1.1 401' -j HEAD -N
[...]
     0.000030 socket(PF_INET, SOCK_STREAM, IPPROTO_TCP) = 3
     0.000028 connect(3, {sa_family=AF_INET, sin_port=htons(80), sin_addr=inet_addr("10.0.60.11")}, 16) = 0
     0.000198 sendto(3, "HEAD / HTTP/1.1\r\nUser-Agent: check_http/v2.2.1 (nagios-plugins 2.2.1)\r\nConnection: close\r\nHost: xxxxx.yyyy.com\r\nAccept: */*\r\n\r\n", 146, 0, NULL, 0) = 146
     0.000044 read(3, "HTTP/1.1 401 Authorization Required\r\nDate: Thu, 06 Jul 2017 00:54:36 GMT\r\nServer: Apache/2.2.15 (Red Hat)\r\nWWW-Authenticate: Basic realm=\"LDAP authentication\"\r\nConnection: close\r\nContent-Type: text/html; charset=iso-8859-1\r\n\r\n", 8191) = 226
     0.000728 close(3)                  = 0
     9.998757 --- SIGALRM {si_signo=SIGALRM, si_code=SI_KERNEL, si_value={int=0, ptr=0x100000000}} ---
     0.000062 write(1, "CRITICAL", 8CRITICAL)   = 8
     0.000041 write(1, " - Socket timeout\n", 18 - Socket timeout
) = 18
     0.000068 exit_group(2)             = ?

and the relevant strace section from the old (2.1.4) plugin:

     0.000031 socket(PF_INET, SOCK_STREAM, IPPROTO_TCP) = 3
     0.000028 connect(3, {sa_family=AF_INET, sin_port=htons(80), sin_addr=inet_addr("10.0.60.11")}, 16) = 0
     0.000207 sendto(3, "HEAD / HTTP/1.1\r\nUser-Agent: check_http/v2.1.4 (nagios-plugins 2.1.4)\r\nConnection: close\r\nHost: backoffice1.ny.tower-research.com\r\nAccept: */*\r\n\r\n", 146, 0, NULL, 0) = 146
     0.000044 read(3, "HTTP/1.1 401 Authorization Required\r\nDate: Thu, 06 Jul 2017 00:59:31 GMT\r\nServer: Apache/2.2.15 (Red Hat)\r\nWWW-Authenticate: Basic realm=\"LDAP authentication\"\r\nConnection: close\r\nContent-Type: text/html; charset=iso-8859-1\r\n\r\n", 8191) = 226
     0.000683 close(3)                  = 0
     0.000044 open("/usr/share/locale/locale.alias", O_RDONLY) = 3
     0.000030 fstat(3, {st_mode=S_IFREG|0644, st_size=2512, ...}) = 0
     0.000042 mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f2816eab000
     0.000028 read(3, "# Locale name alias data base.\n# Copyright (C) 1996-2001,2003,2007 Free Software Foundation, Inc.\n#\n# This program is free software; you can redistribute it and/or modify\n# it under the terms of the GNU General Public License as published by\n# the Free Sof"..., 4096) = 2512
     0.000057 read(3, "", 4096)         = 0
     0.000026 close(3)                  = 0
     0.000025 munmap(0x7f2816eab000, 4096) = 0
     0.000036 open("/usr/share/locale/en_US.utf8/LC_MESSAGES/nagios-plugins.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
     0.000033 open("/usr/share/locale/en_US/LC_MESSAGES/nagios-plugins.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
     0.000032 open("/usr/share/locale/en.utf8/LC_MESSAGES/nagios-plugins.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
     0.000031 open("/usr/share/locale/en/LC_MESSAGES/nagios-plugins.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
     0.000033 alarm(0)                  = 10
     0.000039 fstat(1, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 3), ...}) = 0
     0.000036 mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f2816eab000
     0.000030 write(1, "HTTP OK: Status line output matched \"HTTP/1.1 401\" - 226 bytes in 0.001 second response time |time=0.001244s;;;0.000000 size=226B;;;0\n", 134HTTP OK: Status line output matched "HTTP/1.1 401" - 226 bytes in 0.001 second response time |time=0.001244s;;;0.000000 size=226B;;;0
) = 134
     0.000063 exit_group(0)             = ?
Comment 5 Stephen John Smoogen 2017-07-05 21:13:33 EDT
Replicated this problem. It seems to be with the -N option. Upstream bug was already open on this https://github.com/nagios-plugins/nagios-plugins/issues/283

I will look at the pull request listed and adding that to a bugfix.
Comment 6 Fedora Update System 2017-07-05 22:48:13 EDT
nagios-plugins-2.2.1-2git.el6 has been pushed to the Fedora EPEL 6 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2017-62fe0218d0
Comment 7 Fedora Update System 2017-07-05 22:49:32 EDT
nagios-plugins-2.2.1-2git.el7 has been pushed to the Fedora EPEL 7 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2017-cc0aeaca30
Comment 8 Fedora Update System 2017-07-12 16:30:28 EDT
nagios-plugins-2.2.1-3git.el6 has been submitted as an update to Fedora EPEL 6. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2017-76229ef8c9
Comment 9 Fedora Update System 2017-07-13 15:49:03 EDT
nagios-plugins-2.2.1-3git.el6 has been pushed to the Fedora EPEL 6 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2017-76229ef8c9
Comment 10 Fedora Update System 2017-07-13 15:51:27 EDT
nagios-plugins-2.2.1-3git.el7 has been pushed to the Fedora EPEL 7 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2017-4b1c55c024
Comment 11 Fedora Update System 2017-07-13 17:21:48 EDT
nagios-plugins-2.2.1-3git.fc24 has been pushed to the Fedora 24 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-6401b28fc4
Comment 12 Fedora Update System 2017-07-13 17:24:06 EDT
nagios-plugins-2.2.1-3git.fc25 has been pushed to the Fedora 25 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-8d031793bf
Comment 13 Fedora Update System 2017-07-13 19:54:16 EDT
nagios-plugins-2.2.1-3git.fc26 has been pushed to the Fedora 26 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-a5f81422dc
Comment 14 Fedora Update System 2017-07-14 14:58:40 EDT
nagios-plugins-2.2.1-4git.fc26 has been submitted as an update to Fedora 26. https://bodhi.fedoraproject.org/updates/FEDORA-2017-c2e82de3b3
Comment 15 Fedora Update System 2017-07-16 17:21:29 EDT
nagios-plugins-2.2.1-4git.fc26 has been pushed to the Fedora 26 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-c2e82de3b3
Comment 16 Fedora Update System 2017-07-23 00:18:10 EDT
nagios-plugins-2.2.1-4git.el6 has been pushed to the Fedora EPEL 6 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2017-8973027f42
Comment 17 Fedora Update System 2017-07-23 00:23:19 EDT
nagios-plugins-2.2.1-4git.el7 has been pushed to the Fedora EPEL 7 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2017-87ebfdc686
Comment 18 Fedora Update System 2017-07-23 17:51:23 EDT
nagios-plugins-2.2.1-3git.fc24 has been pushed to the Fedora 24 stable repository. If problems still persist, please make note of it in this bug report.
Comment 19 Fedora Update System 2017-08-03 11:53:01 EDT
nagios-plugins-2.2.1-4git.fc26 has been pushed to the Fedora 26 stable repository. If problems still persist, please make note of it in this bug report.
Comment 20 Fedora Update System 2017-08-09 11:23:03 EDT
nagios-plugins-2.2.1-4git.el7 has been pushed to the Fedora EPEL 7 stable repository. If problems still persist, please make note of it in this bug report.
Comment 21 Fedora Update System 2017-08-09 15:57:16 EDT
nagios-plugins-2.2.1-3git.fc25 has been pushed to the Fedora 25 stable repository. If problems still persist, please make note of it in this bug report.
Comment 22 Fedora Update System 2017-08-10 02:19:39 EDT
nagios-plugins-2.2.1-4git.el6 has been pushed to the Fedora EPEL 6 stable repository. If problems still persist, please make note of it in this bug report.

Note You need to log in before you can comment on or make changes to this bug.