aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--debian/changelog7
-rwxr-xr-xnagios-plugins/check_etc_hosts4
2 files changed, 10 insertions, 1 deletions
diff --git a/debian/changelog b/debian/changelog
index 4a36546..389c95d 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+sitesummary (0.1.2) UNRELEASED; urgency=low
+
+ * Add support in nagios plugin check_etc_hosts for ignoring entires
+ tagged '# NAGIOSIGNORE'.
+
+ -- Petter Reinholdtsen <pere@debian.org> Tue, 31 Jan 2012 19:55:29 +0100
+
sitesummary (0.1.1) unstable; urgency=low
* Raise Nagios cups queue length limit (w10,c50 to w30,c70) as 10
diff --git a/nagios-plugins/check_etc_hosts b/nagios-plugins/check_etc_hosts
index b7f7268..48cb356 100755
--- a/nagios-plugins/check_etc_hosts
+++ b/nagios-plugins/check_etc_hosts
@@ -5,7 +5,8 @@
#
# Check /etc/hosts, and make sure the content matches the information
# in DNS. Lookup IP, and check if the names listed in /etc/hosts
-# maches the one in DNS.
+# maches the one in DNS. It will ignore entries with '# NAGIOSIGNORE'
+# at the end.
use vars qw($use_perl_resolver $debug $returnvalue $nagiosmsg);
@@ -222,6 +223,7 @@ sub check_etc_hosts {
chomp;
s/\#.+//; # Skip comments
next if (/^\s*$/); # Skip empty lines
+ next if (/# NAGIOSIGNORE$/); # Skip lines marked to be ignored
print "Testing $_\n" if $debug;