From 511cb1fe551e77a53685f8fc80a7ecab8f6a19a4 Mon Sep 17 00:00:00 2001 From: Petter Reinholdtsen Date: Tue, 17 Jan 2012 17:58:55 +0000 Subject: Limit Nagios monitoring to hosts in DNS, unless the Nagios client tools are installed, to avoid monitoring machines before they are configured. --- sitesummary-nodes | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'sitesummary-nodes') diff --git a/sitesummary-nodes b/sitesummary-nodes index f52b8c7..eb2f599 100755 --- a/sitesummary-nodes +++ b/sitesummary-nodes @@ -249,6 +249,13 @@ sub generate_nagios_config { next; } + # Only check hosts missing in DNS if they have the nagios + # tools installed. + if ($hostname =~ m/^[\d\.:]+$/ && ! $remote && ! $nagiosclient) { + print "# Skipping host $hostname missing in DNS\n"; + next; + } + my $site = get_site($hostid) || "none"; my $sitegroup = get_sitegroup($hostid); my $debversion = get_debian_ver($hostid); -- cgit v1.2.3