소스 검색

I missed it during the commit

root 1 년 전
부모
커밋
bb37215618
1개의 변경된 파일2개의 추가작업 그리고 0개의 파일을 삭제
  1. 2 0
      scripts/gen_nagios_config.pl

+ 2 - 0
scripts/gen_nagios_config.pl

@@ -63,6 +63,7 @@ if (scalar(@netdev_list)>0) {
         $ip =~s/\/\d+$//g;
         my $device_id = 'netdev_'.$router->{'id'};
         $devices{$device_id}{ip}=$ip;
+
 	setCommunity($router);
 	$devices{$device_id}{snmp} = $router->{snmp};
 
@@ -152,6 +153,7 @@ if (scalar(@auth_list)>0) {
 
 	#snmp parameters
 	setCommunity($auth_device);
+        $devices{$device_id}{snmp}=$auth_device->{snmp} if ($auth_device->{snmp});
 
         $devices{$device_id}{ip}=$ip;