diff options
-rw-r--r-- | debian/changelog | 4 | ||||
-rwxr-xr-x | nagios-plugins/check_etc_resolv | 4 |
2 files changed, 5 insertions, 3 deletions
diff --git a/debian/changelog b/debian/changelog index cbf2b02..7d9df45 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,7 +1,7 @@ sitesummary (0.1.2) UNRELEASED; urgency=low - * Add support in nagios plugin check_etc_hosts for ignoring entires - tagged '# NAGIOSIGNORE'. + * Add support in nagios plugins check_etc_hosts and check_etc_resolv + for ignoring entires tagged '# NAGIOSIGNORE'. * Drop Nagios check for user count, as the check do not check anything useful, and the default nrpe setup do not allow us to raise the warning levels. diff --git a/nagios-plugins/check_etc_resolv b/nagios-plugins/check_etc_resolv index 18ac87d..185cf39 100755 --- a/nagios-plugins/check_etc_resolv +++ b/nagios-plugins/check_etc_resolv @@ -3,7 +3,8 @@ # Author: Petter Reinholdtsen <pere@hungry.com> # Date: 2001-11-09 # -# Check /etc/resolv.conf, and make sure the name servers listed are working. +# Check /etc/resolv.conf, and make sure the name servers listed are +# working. It will ignore entries with '# NAGIOSIGNORE' at the end. use Socket; @@ -101,6 +102,7 @@ sub check_etc_resolv_conf { chomp; s/\#.+//; # Skip comments next if (/^\s*$/); # Skip empty lines + next if (/# NAGIOSIGNORE$/); # Skip lines marked to be ignored if (/^nameserver\s+(\S+)/) { $count++; local ($error) = test_dns_server($1); |