diff options
author | Petter Reinholdtsen <pere@hungry.com> | 2012-01-31 18:56:39 +0000 |
---|---|---|
committer | Petter Reinholdtsen <pere@hungry.com> | 2012-01-31 18:56:39 +0000 |
commit | 5471251a4825782e023a3cbba4762ca652b7cb17 (patch) | |
tree | f3f9f59d2a7283ba675c81d8b060d4b50384fe65 | |
parent | c29db339548e574516b9c037e0c4788c5d92fe56 (diff) | |
download | sitesummary-5471251a4825782e023a3cbba4762ca652b7cb17.tar.gz sitesummary-5471251a4825782e023a3cbba4762ca652b7cb17.tar.bz2 sitesummary-5471251a4825782e023a3cbba4762ca652b7cb17.tar.xz |
Add support in nagios plugin check_etc_hosts for ignoring entires tagged '# NAGIOSIGNORE'.
-rw-r--r-- | debian/changelog | 7 | ||||
-rwxr-xr-x | nagios-plugins/check_etc_hosts | 4 |
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; |