diff options
author | Petter Reinholdtsen <pere@hungry.com> | 2010-01-23 10:29:03 +0000 |
---|---|---|
committer | Petter Reinholdtsen <pere@hungry.com> | 2010-01-23 10:29:03 +0000 |
commit | c7c1711b655176f8513a763ef19419b23169c492 (patch) | |
tree | f8b3b880bc57a6ce1647812bc86104bed6b62cdc | |
parent | c5220f687c1ab005af375d8621e58dd793c28da9 (diff) | |
download | sitesummary-c7c1711b655176f8513a763ef19419b23169c492.tar.gz sitesummary-c7c1711b655176f8513a763ef19419b23169c492.tar.bz2 sitesummary-c7c1711b655176f8513a763ef19419b23169c492.tar.xz |
Give all switches a switch hostgroup.
-rwxr-xr-x | sitesummary-nodes | 4 |
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; |