diff options
author | Petter Reinholdtsen <pere@hungry.com> | 2012-01-17 17:58:55 +0000 |
---|---|---|
committer | Petter Reinholdtsen <pere@hungry.com> | 2012-01-17 17:58:55 +0000 |
commit | 511cb1fe551e77a53685f8fc80a7ecab8f6a19a4 (patch) | |
tree | ac94f56948d0a0b71fe738d1c7e32e3ee462113e /sitesummary-nodes | |
parent | 14c968288879b2f7acae54f6cd49f888e6517fb0 (diff) | |
download | sitesummary-511cb1fe551e77a53685f8fc80a7ecab8f6a19a4.tar.gz sitesummary-511cb1fe551e77a53685f8fc80a7ecab8f6a19a4.tar.bz2 sitesummary-511cb1fe551e77a53685f8fc80a7ecab8f6a19a4.tar.xz |
Limit Nagios monitoring to hosts in DNS, unless the Nagios client
tools are installed, to avoid monitoring machines before they are
configured.
Diffstat (limited to 'sitesummary-nodes')
-rwxr-xr-x | sitesummary-nodes | 7 |
1 files changed, 7 insertions, 0 deletions
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); |