check_dig: expected address is an exact match (#1385)

Oliver Skibbe notifications at github.com
Wed Oct 14 09:11:12 CEST 2015


Expected address is not fully matched for example

Assume i have a host which has the IP 173.194.116.215 and i want to check
against it:
``´./check_dig -H dns1 -vvvv -l www.google.de -a 173.194.116.215```

As expected check_dig returns OK, but if its checked for .21:
``´./check_dig -H dns1 -vvvv -l www.google.de -a 173.194.116.21```

It returns also OK, because strstr/strcasestr just locate substrings but it
might return a WARNING/CRITICAL because it matches not 100%


To not break working setups we could add a new option -e --exact-match which
toggles strict checking and then returns WARN/CRIT if the result and the
expected result do not match 100%

---
Reply to this email directly or view it on GitHub:
https://github.com/monitoring-plugins/monitoring-plugins/issues/1385
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-plugins.org/archive/devel/attachments/20151014/665434a5/attachment.html>


More information about the Devel mailing list