diff options
-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; |