upd
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
using System.Text;
|
||||
using System.Xml.Linq;
|
||||
|
||||
namespace GenerateYAMLforZabbix
|
||||
{
|
||||
@@ -16,14 +17,16 @@ namespace GenerateYAMLforZabbix
|
||||
foreach (var host in list)
|
||||
{
|
||||
//var act4 = host[0].Split(".")[3];
|
||||
var text = $""+
|
||||
var text = $"" +
|
||||
$" - host: {host[0]}\r\n" +
|
||||
$" name: (СПб){host[1]}\r\n" +
|
||||
$" name: (ВНК54){host[1]}\r\n" +
|
||||
$" templates:\r\n" +
|
||||
$" - name: 'SEC Dahua Camera SNMP'\r\n" +
|
||||
$" groups:\r\n" +
|
||||
$" - name: dahua.cam.spb\r\n" +
|
||||
$" - name: dahua.cam.vnk.54\r\n" +
|
||||
$" interfaces:\r\n" +
|
||||
$" - ip: {host[0]}\r\n" +
|
||||
$" interface_ref: if2\r\n" +
|
||||
$" - type: SNMP\r\n" +
|
||||
$" ip: {host[0]}\r\n" +
|
||||
$" port: '161'\r\n" +
|
||||
@@ -36,4 +39,20 @@ namespace GenerateYAMLforZabbix
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
// - host: 172.16.54.16
|
||||
//name: 'Антресоль 3 1-56-T'
|
||||
// templates:
|
||||
//-name: 'SEC Dahua Camera SNMP'
|
||||
// groups:
|
||||
//-name: dahua.cam.vnk.54
|
||||
// interfaces:
|
||||
//-ip: 172.16.54.16
|
||||
// interface_ref: if2
|
||||
// - type: SNMP
|
||||
// ip: 172.16.54.16
|
||||
// port: '161'
|
||||
// details:
|
||||
//community: '{$SNMP_COMMUNITY}'
|
||||
// interface_ref: if1
|
||||
// inventory_mode: DISABLED
|
||||
Reference in New Issue
Block a user