Bug 1465784 - nagios http plugin is old and buggy
Summary: nagios http plugin is old and buggy
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora EPEL
Classification: Fedora
Component: nagios-plugins
Version: el6
Hardware: Unspecified
OS: Linux
unspecified
unspecified
Target Milestone: ---
Assignee: Stephen John Smoogen
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-06-28 08:01 UTC by Fabrice Bacchella
Modified: 2017-08-10 06:19 UTC (History)
9 users (show)

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:
Clone Of:
Environment:
Last Closed: 2017-07-23 21:51:23 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github 217 0 None None None 2017-06-28 08:01:57 UTC

Description Fabrice Bacchella 2017-06-28 08:01:57 UTC
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> - 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 13:54:26 UTC
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 15:26:44 UTC
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 20:54:19 UTC
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-06 01:00:59 UTC
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-06 01:13:33 UTC
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-06 02:48:13 UTC
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-06 02:49:32 UTC
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 20:30:28 UTC
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 19:49:03 UTC
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 19:51:27 UTC
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 21:21:48 UTC
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 21:24:06 UTC
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 23:54:16 UTC
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 18:58:40 UTC
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 21:21:29 UTC
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 04:18:10 UTC
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 04:23:19 UTC
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 21:51:23 UTC
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 15:53:01 UTC
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 15:23:03 UTC
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 19:57:16 UTC
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 06:19:39 UTC
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.