aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPetter Reinholdtsen <pere@hungry.com>2010-01-23 10:29:03 +0000
committerPetter Reinholdtsen <pere@hungry.com>2010-01-23 10:29:03 +0000
commitc7c1711b655176f8513a763ef19419b23169c492 (patch)
treef8b3b880bc57a6ce1647812bc86104bed6b62cdc
parentc5220f687c1ab005af375d8621e58dd793c28da9 (diff)
downloadsitesummary-c7c1711b655176f8513a763ef19419b23169c492.tar.gz
sitesummary-c7c1711b655176f8513a763ef19419b23169c492.tar.bz2
sitesummary-c7c1711b655176f8513a763ef19419b23169c492.tar.xz
Give all switches a switch hostgroup.
-rwxr-xr-xsitesummary-nodes4
1 files changed, 3 insertions, 1 deletions
diff --git a/sitesummary-nodes b/sitesummary-nodes
index bff603a..1602fcb 100755
--- a/sitesummary-nodes
+++ b/sitesummary-nodes
@@ -265,7 +265,9 @@ sub generate_nagios_config {
my %switch = get_switch_info($hostid);
my @parents = ();
for my $addr (keys %switch) {
- print_nagios_host_check("switch-host", $switch{$addr}, $addr, undef)
+ $hostgroup{"switch"} = 1;
+ print_nagios_host_check("switch-host", $switch{$addr}, $addr,
+ undef, "switch")
unless (exists $hosts{$switch{$addr}});
$hosts{$switch{$addr}} = $addr;
push(@parents, $switch{$addr}) if $remote;