Skip to content

Commit

Permalink
Nagios exporter failed to set valid group from device entity if subne…
Browse files Browse the repository at this point in the history
…t info incomplete
  • Loading branch information
Carlos Vicente committed Dec 13, 2011
1 parent c752178 commit 5a68688
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions lib/Netdot/Exporter/Nagios.pm
Expand Up @@ -198,8 +198,11 @@ sub generate_configs {
if ( my $subnet = $device_info->{$devid}->{subnet} ){
$group = $subnet_info{$subnet}->{entity} ||
$subnet_info{$subnet}->{description};
}elsif ( my $entity = $device_info->{$devid}->{used_by} ){
$group = $entity;
}
unless ( $group ){
if ( my $entity = $device_info->{$devid}->{used_by} ){
$group = $entity;
}
}
unless ( $group ){
$logger->warn("Device $hostname in unknown group");
Expand Down

0 comments on commit 5a68688

Please sign in to comment.