浏览代码

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;