Bug 1410324
Summary: | nagios-plugins 2.1.4: check_dns lost MX priority on output | ||
---|---|---|---|
Product: | [Fedora] Fedora EPEL | Reporter: | Peter Bieringer <pb> |
Component: | nagios-plugins | Assignee: | Stephen John Smoogen <smooge> |
Status: | CLOSED ERRATA | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
Severity: | low | Docs Contact: | |
Priority: | unspecified | ||
Version: | epel7 | CC: | b.heden, jfrickson, kmf, mhayden, ondrejj, smooge, smooge, swilkerson |
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | nagios-plugins-2.2.1-1.el7 | Doc Type: | If docs needed, set a value |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2017-06-30 03:17:19 UTC | Type: | Bug |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
Peter Bieringer
2017-01-05 06:44:47 UTC
I opened a bug report upstream at https://github.com/nagios-plugins/nagios-plugins/issues/220 nagios-plugins-2.1.4-5.el7 has been submitted as an update to Fedora EPEL 7. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2017-0430ba2927 nagios-plugins-2.1.4-5.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-0430ba2927 nagios-plugins-2.1.4-6.el7 has been submitted as an update to Fedora EPEL 7. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2017-4bf2c82fc6 nagios-plugins-2.1.4-7.el7 has been submitted as an update to Fedora EPEL 7. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2017-d35ac726be nagios-plugins-2.1.4-7.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-d35ac726be Still not fixed: $ /usr/lib64/nagios/plugins/check_dns -V check_dns v2.1.4 (nagios-plugins 2.1.4) $ /usr/lib64/nagios/plugins/check_dns -q MX -H google.com DNS OK: 0,006 seconds response time. google.com returns alt1.aspmx.l.google.com.,alt2.aspmx.l.google.com.,alt3.aspmx.l.google.com.,alt4.aspmx.l.google.com.,aspmx.l.google.com.|time=0,006436s;;;0,000000 -> no MX priority shown Besides that there are some major issues with check_http, reported e.g. https://github.com/nagios-plugins/nagios-plugins/issues/236 imho, this update should NOT be pushed to stable, because it would makes a lot of admins unhappy... OK thanks. I will open a bug upstream on the check_dns. If you haven't already, please put a -1 in bodhi to keep it from getting pushed. https://bodhi.fedoraproject.org/updates/?packages=nagios-plugins Alright, I have updated the code to 2.2.0 which doesn't fix this, but I have fixed this bug in check_dns.c so it gives output similar to what was there before. Could you check to see if the build in https://koji.fedoraproject.org/koji/taskinfo?taskID=18038883 works for you? If so I will replace the current 2.1.4 with 2.2.0 in epel-testing MX priority return in 2.2.0: # /usr/lib64/nagios/plugins/check_dns -V check_dns v2.2.0 (nagios-plugins 2.2.0) # /usr/lib64/nagios/plugins/check_dns -q MX -H google.com DNS OK: 0,007 seconds response time. google.com returns 10 aspmx.l.google.com.,20 alt1.aspmx.l.google.com.,30 alt2.aspmx.l.google.com.,40 alt3.aspmx.l.google.com.,50 alt4.aspmx.l.google.com.|time=0,006620s;;;0,000000 BUT now the TXT query is *completly* broken which kills my SPF record checks # /usr/lib64/nagios/plugins/check_dns -V check_dns v2.2.0 (nagios-plugins 2.2.0) # /usr/lib64/nagios/plugins/check_dns -t 20 -q TXT -H lists.bieringer.de DNS CRITICAL - '/usr/bin/nslookup -sil' returned empty host name string # /root/nagios-plugins/2.1.4/check_dns -V -t 20 -q TXT -H lists.bieringer.de check_dns v2.1.4 (nagios-plugins 2.1.4) # /root/nagios-plugins/2.1.4/check_dns -t 20 -q TXT -H lists.bieringer.de DNS OK: 0,007 seconds response time. lists.bieringer.de returns -all"|time=0,006967s;;;0,000000 Not detected that even 2.1.4 was already totally broken...original output of DNS TXT record is btw: # dig +short txt lists.bieringer.de "v=spf1 ip4:85.214.250.30 ip4:85.214.252.130 ip6:2001:a60:9002::/48 ip6:2001:4dd0:ff00:834::2 ip6:2a01:238:423d:8800:85b3:9e6b:3019:8909 ip4:85.214.150.73 ip4:85.214.153.25 ip6:2a01:238:4281:8600:812a:5915:8d24:58f3 mx -all" They completely changed how they are doing this code so I need to see a version that worked to see if I can mangle it back to how it was. The problem seems to be that the old way of parsing TXT worked for spf but broke other records. So I can probably fix your case but it will break others so there is going to be a "why DNS is crap to store data :)" kind of ticket. "old way" aka 2.1.4 was not really working well (as detected today), but at least it returned an "OK" if a TXT entry was found...now it's totally broken. One can generally discuss whether "check_dns" need some major review/improvements, because being a simple "nslookup" stdout wrapper+parser can turn in to next ugly issues, once nslookup output changes. 2.1.4 and 2.2.0 is using: /usr/bin/nslookup -sil -querytype=TXT lists.bieringer.de Server: 127.0.0.1 Address: 127.0.0.1#53 Non-authoritative answer: lists.bieringer.de text = "v=spf1 ip4:85.214.250.30 ip4:85.214.252.130 ip6:2001:a60:9002::/48 ip6:2001:4dd0:ff00:834::2 ip6:2a01:238:423d:8800:85b3:9e6b:3019:8909 ip4:85.214.150.73 ip4:85.214.153.25 ip6:2a01:238:4281:8600:812a:5915:8d24:58f3 mx -all" Authoritative answers can be found from: bieringer.de nameserver = robotns3.second-ns.com. bieringer.de nameserver = robotns2.second-ns.de. bieringer.de nameserver = ns1.first-ns.de. robotns3.second-ns.com internet address = 193.47.99.3 robotns2.second-ns.de internet address = 213.133.105.6 ns1.first-ns.de internet address = 213.239.242.238 ns1.first-ns.de has AAAA address 2a01:4f8:0:a101::a:1 imho, output from "dig" would be perhaps more reliable and machine readable and best would be to use library calls and not stdout of any other Linux command here, e.g. # dig +short TXT lists.bieringer.de "v=spf1 ip4:85.214.250.30 ip4:85.214.252.130 ip6:2001:a60:9002::/48 ip6:2001:4dd0:ff00:834::2 ip6:2a01:238:423d:8800:85b3:9e6b:3019:8909 ip4:85.214.150.73 ip4:85.214.153.25 ip6:2a01:238:4281:8600:812a:5915:8d24:58f3 mx -all" OK this is me being an idiot and not doing a string comparison correctly. I will revert that bit and the old 2.1.4 version will come back. Was it working in 2.0.3? OK so here is the fixed output: 2.0.3 version: [smooge@localhost plugins]$ pwd /home/smooge/rpmbuild/BUILD/nagios-plugins-2.0.3/plugins [smooge@localhost plugins]$ ./check_dns -q TXT -H lists.bieringer.de DNS OK: 0.095 seconds response time. Lists.bieringer.de returns "v=spf1 ip4:85.214.250.30 ip4:85.214.252.130 ip6:2001:a60:9002::/48 ip6:2001:4dd0:ff00:834::2 ip6:2a01:238:423d:8800:85b3:9e6b:3019:8909 ip4:85.214.150.73 ip4:85.214.153.25 ip6:2a01:238:4281:8600:812a:5915:8d24:58f3 mx -all"|time=0.094737s;;;0.000000 2.2.0 version: [smooge@localhost plugins]$ ./check_dns -q TXT -H lists.bieringer.de DNS OK: 0.100 seconds response time. lists.bieringer.de returns "v=spf1 ip4:85.214.250.30 ip4:85.214.252.130 ip6:2001:a60:9002::/48 ip6:2001:4dd0:ff00:834::2 ip6:2a01:238:423d:8800:85b3:9e6b:3019:8909 ip4:85.214.150.73 ip4:85.214.153.25 ip6:2a01:238:4281:8600:812a:5915:8d24:58f3 mx -all"|time=0.099618s;;;0.000000 The request for using dig versus nslookup should be taken up upstream because I am not sure I can better advocate it than you did. Updated builds are in https://koji.fedoraproject.org/koji/taskinfo?taskID=18055261 Please let me know if it fixes things. I am also working on trying to track down an HTTP fix TXT record check is now working again - thank you for the quick fix! OK I have a 'fix' for the HTTP as listed in the bug which I will put into the build and then put into EPEL-testing. Please check and if it works give it the thumbs up in bodhi. nagios-plugins-2.2.0-3.el7 has been submitted as an update to Fedora EPEL 7. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2017-cbb077cc9b nagios-plugins-2.2.0-4.el7 has been submitted as an update to Fedora EPEL 7. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2017-579895db6a nagios-plugins-2.2.0-4.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-579895db6a nagios-plugins-2.2.0-6.el7 has been submitted as an update to Fedora EPEL 7. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2017-212f3ef76e nagios-plugins-2.2.0-6.el7 lost the fixes of 2.2.0-4 :-( # ./2.2.0-4/check_dns -t 20 -q MX -H lists.bieringer.de DNS OK: 0,007 seconds response time. lists.bieringer.de returns 10 st2.bieringer.net.|time=0,006539s;;;0,000000 # ./2.2.0-6/check_dns -t 20 -q MX -H lists.bieringer.de DNS OK: 0,007 seconds response time. lists.bieringer.de returns st2.bieringer.net.|time=0,006675s;;;0,000000 nagios-plugins-2.2.0-6.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-212f3ef76e nagios-plugins-2.2.0-7.el7 has been submitted as an update to Fedora EPEL 7. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2017-756fbbf351 nagios-plugins-2.2.0-7.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-756fbbf351 Just an FYI from upstream: smooge's patches have been applied to Nagios Plugins version 2.2.1-rc1, which is due to be released on April 19. nagios-plugins-2.2.1-1.el7 has been submitted as an update to Fedora EPEL 7. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2017-e452ab1676 nagios-plugins-2.2.1-1.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-e452ab1676 nagios-plugins-2.2.1-1.el7 has been pushed to the Fedora EPEL 7 stable repository. If problems still persist, please make note of it in this bug report. |