Bug 2251960

Summary: For certain lengths of names dig plugin fails to find addresses
Product: [Fedora] Fedora EPEL Reporter: Petr Menšík <pemensik>
Component: nagios-pluginsAssignee: Guido Aulisi <guido.aulisi>
Status: NEW --- QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: epel9CC: extras-qa, guido.aulisi, igor.raits, lemenkov, smooge
Target Milestone: ---Keywords: Regression
Target Release: ---   
Hardware: Unspecified   
OS: Linux   
URL: https://github.com/nagios-plugins/nagios-plugins/pull/745
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 2251959 Environment:
Last Closed: Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 2251959    
Bug Blocks:    

Description Petr Menšík 2023-11-28 16:38:36 UTC
+++ This bug was initially created as a clone of Bug #2251959 +++

During report on bind-utils for RHEL9, it were found dig plugin fails to correctly match name looked for.

It depends on wrong assumption that each record type is delimited by tab. That is not necessary the case.

https://github.com/nagios-plugins/nagios-plugins/pull/745

Reproducible: Always

Steps to Reproduce:
1. dnf install bind-utils nagios-plugins dnsmasq
2. echo 'address=/12-345678example.com/172.23.75.243' > /etc/dnsmasq.d/long.conf
3. systemctl restart dnsmasq
4. /usr/lib64/nagios/plugins/check_dig  -l lxos-monitoring-probe.12-345678example.com -a 172.23.75.243
Actual Results:  
# /usr/lib64/nagios/plugins/check_dig  -l lxos-monitoring-probe.12-345678example.com -a 172.23.75.243
DNS WARNING - 0.012 seconds response time (Server not found in ANSWER SECTION)|time=0.011995s;;;0.000000


Expected Results:  
$ ./check_dig -l lxos-monitoring-probe.12-345678example.com -a 172.23.75.243 -t 600
DNS OK - 0,044 seconds response time (lxos-monitoring-probe.12-345678example.com. 10 IN A 172.23.75.243)|time=0,044113s;;;0,000000


Caused by commit https://github.com/nagios-plugins/nagios-plugins/commit/cbdfd8a9bd83ed22dc6e9b3e5104ed81de388596