aboutsummaryrefslogtreecommitdiffstats
path: root/sitesummary-nodes
diff options
context:
space:
mode:
Diffstat (limited to 'sitesummary-nodes')
-rwxr-xr-xsitesummary-nodes5
1 files changed, 5 insertions, 0 deletions
diff --git a/sitesummary-nodes b/sitesummary-nodes
index ab2ecf1..fb27d57 100755
--- a/sitesummary-nodes
+++ b/sitesummary-nodes
@@ -251,6 +251,11 @@ sub generate_nagios_config {
my $address = get_dns_address($hostid);
my $localhostname = get_localhostname($hostid);
+ unless (defined $address && defined $localhostname) {
+ print "# Skipping ID $hostid without hostname and address\n";
+ next;
+ }
+
my $redirect = "";
my $nagiosclient = is_nagios_client($hostid);
my $remote = is_remote_nagios_client($hostid);