-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathtelegraf-snmp.j2
111 lines (93 loc) · 2.8 KB
/
telegraf-snmp.j2
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
{% if telegraf.snmp is defined %}
[[inputs.snmp]]
agents = [ {% for device,port in telegraf.snmp.hosts.items() %}"{{device}}:{{port}}" {% if not loop.last %}, {%endif%}{% endfor %}]
name_prefix = "snmp_"
interval = "10s"
version = 2
community = "{{telegraf.snmp.community}}"
[[inputs.snmp.field]]
name = "hostname"
oid = ".1.3.6.1.2.1.1.5.0"
is_tag = true
[[inputs.snmp.field]]
name = "uptime"
oid = ".1.3.6.1.2.1.1.3.0"
[[inputs.snmp.field]]
name = "sysObjectID"
oid = ".1.3.6.1.2.1.1.2.0"
[[inputs.snmp.field]]
name = "jnxBoxSerialNo"
oid="JUNIPER-MIB::jnxBoxSerialNo.0"
[[inputs.snmp.field]]
name = "jnxBoxDescr"
oid="JUNIPER-MIB::jnxBoxDescr.0"
[[inputs.snmp.field]]
name = "jnxHwFamily"
oid="JUNIPER-MIB::jnxBoxDescr.0"
is_tag = true
[[inputs.snmp.field]]
name = "jnxBoxInstalled"
oid="JUNIPER-MIB::jnxBoxInstalled.0"
[[inputs.snmp.field]]
name = "jnxVirtualChassisMemberSWVersion"
oid="JUNIPER-VIRTUALCHASSIS-MIB::jnxVirtualChassisMemberSWVersion.0"
[[inputs.snmp.field]]
name = "jnxSoftwareVersion"
oid="JUNIPER-VIRTUALCHASSIS-MIB::jnxVirtualChassisMemberSWVersion.0"
is_tag = true
[[inputs.snmp.table]]
name = "hw_anatomy"
inherit_tags = [ "hostname" ]
oid = "JUNIPER-MIB::jnxOperatingTable"
[[inputs.snmp.table.field]]
name = "jnxOperatingChassisDescr"
oid = "JUNIPER-MIB::jnxOperatingChassisDescr"
is_tag = true
[[inputs.snmp.field]]
name = "sysHostname"
oid = ".1.3.6.1.2.1.1.5.0"
[[inputs.snmp.table]]
name = "bgp_statistics"
inherit_tags = [ "hostname" ]
oid = "BGP4-MIB::bgpPeerTable"
[[inputs.snmp.table.field]]
name = "bgpPeerState"
oid = ".1.3.6.1.2.1.15.3.1.2"
is_tag = true
[[inputs.snmp.table.field]]
name = "bgpPeerRemoteAddr"
oid = ".1.3.6.1.2.1.15.3.1.7"
is_tag = true
[[inputs.snmp.table]]
name = "routing_statistics"
inherit_tags = [ "hostname" ]
oid = "IP-FORWARD-MIB::inetCidrRouteTable"
[[inputs.snmp.field]]
name="inetCidrRouteNumber"
oid="IP-FORWARD-MIB::inetCidrRouteNumber"
[[inputs.snmp.table.field]]
name = "inetCidrRouteDest"
oid = "IP-FORWARD-MIB::inetCidrRouteDest"
is_tag = true
[[inputs.snmp.table.field]]
name = "inetCidrRouteProto"
oid = "IP-FORWARD-MIB::inetCidrRouteProto"
is_tag = true
[[inputs.snmp.table]]
name = "interfaces_statistics"
inherit_tags = [ "hostname" ]
oid = "IF-MIB::ifTable"
[[inputs.snmp.table.field]]
name = "ifName"
oid = ".1.3.6.1.2.1.31.1.1.1.1"
is_tag = true
{% endif %}
[[outputs.influxdb]]
urls = ["http://influxdb:8086"]
database = "juniper"
timeout = "5s"
username = "juniper"
password = "juniper"
[agent]
quiet = true
debug = false