diff options
| author | Petter Reinholdtsen <pere@hungry.com> | 2012-08-31 09:03:33 +0000 | 
|---|---|---|
| committer | Petter Reinholdtsen <pere@hungry.com> | 2012-08-31 09:03:33 +0000 | 
| commit | 8f34054357f7087fb2be5e0d122b8f248158eceb (patch) | |
| tree | 46a98b494f6473bcc3d703ecb720cdd011c73715 | |
| parent | 91c87446716af7f7fbb5a1b461273f54fe9f0ebc (diff) | |
| download | sitesummary-8f34054357f7087fb2be5e0d122b8f248158eceb.tar.gz sitesummary-8f34054357f7087fb2be5e0d122b8f248158eceb.tar.bz2 sitesummary-8f34054357f7087fb2be5e0d122b8f248158eceb.tar.xz | |
Make Nagios config more robust, ignore hosts without any name and
address, which must be the result of a corrupt sitesummary entry.
| -rw-r--r-- | debian/changelog | 7 | ||||
| -rwxr-xr-x | sitesummary-nodes | 5 | 
2 files changed, 12 insertions, 0 deletions
| diff --git a/debian/changelog b/debian/changelog index ae69533..5732bb1 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +sitesummary (0.1.6) UNRELEASED; urgency=low + +  * Make Nagios config more robust, ignore hosts without any name and +    address, which must be the result of a corrupt sitesummary entry. + + -- Petter Reinholdtsen <pere@debian.org>  Fri, 31 Aug 2012 11:00:04 +0200 +  sitesummary (0.1.5) unstable; urgency=low    * Team upload. 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); | 
