diff options
author | Petter Reinholdtsen <pere@hungry.com> | 2011-11-14 20:35:57 +0000 |
---|---|---|
committer | Petter Reinholdtsen <pere@hungry.com> | 2011-11-14 20:35:57 +0000 |
commit | 0ea0a7ebe8d225ae4c5a022548974a6075abab89 (patch) | |
tree | 1a503a785fd256be2d0881abc4988991327e6614 | |
parent | 2a17e8d820d3855bc74c4f09adf2928b35317476 (diff) | |
download | sitesummary-0ea0a7ebe8d225ae4c5a022548974a6075abab89.tar.gz sitesummary-0ea0a7ebe8d225ae4c5a022548974a6075abab89.tar.bz2 sitesummary-0ea0a7ebe8d225ae4c5a022548974a6075abab89.tar.xz |
Adjust sitesummary-nodes code for generating Nagios configuration
to avoid perl warnings when no default route is set for a host.
-rw-r--r-- | debian/changelog | 2 | ||||
-rwxr-xr-x | sitesummary-nodes | 6 |
2 files changed, 6 insertions, 2 deletions
diff --git a/debian/changelog b/debian/changelog index 6bce679..1640421 100644 --- a/debian/changelog +++ b/debian/changelog @@ -3,6 +3,8 @@ sitesummary (0.0.70) UNRELEASED; urgency=low * Improve LDAP server Nagios check, not only checking if the TCP port is listening, but also check if the server will reply to searches for the root DSE. + * Adjust sitesummary-nodes code for generating Nagios configuration + to avoid perl warnings when no default route is set for a host. -- Petter Reinholdtsen <pere@debian.org> Mon, 14 Nov 2011 11:42:16 +0100 diff --git a/sitesummary-nodes b/sitesummary-nodes index 6bf5794..970bdfe 100755 --- a/sitesummary-nodes +++ b/sitesummary-nodes @@ -268,8 +268,10 @@ sub generate_nagios_config { for my $group ( @groups ) { $hostgroup{$group} = 1; } - - my $defaultroute = get_dnsnameorip(get_default_route($hostid)); + my $defaultrouteip = get_default_route($hostid); + my $defaultroute; + $defaultroute = get_dnsnameorip($defaultrouteip) + if defined $defaultroute; # Also check default route host if (defined $defaultroute && !exists $hosts{$defaultroute}) { |