diff options
-rw-r--r-- | debian/changelog | 3 | ||||
-rwxr-xr-x | sitesummary-nodes | 7 |
2 files changed, 10 insertions, 0 deletions
diff --git a/debian/changelog b/debian/changelog index 85e4f4a..e753c1b 100644 --- a/debian/changelog +++ b/debian/changelog @@ -6,6 +6,9 @@ sitesummary (0.1.1~svn74458) UNRELEASED; urgency=low * Raise Nagios user (w20,c50 to w150,c200) and process limits (w500,c1000 to w1500,c2500) on LTSP servers, as these normally will have lots of users and processes. + * Limit Nagios monitoring to hosts in DNS, unless the Nagios client + tools are installed, to avoid monitoring machines before they are + configured. -- Petter Reinholdtsen <pere@debian.org> Tue, 17 Jan 2012 09:53:13 +0100 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); |