snmp-exporter
SNMP Exporter this exporter is the recommended way to expose SNMP data in a format which Prometheus can ingest.
How to generate snmp-exporter configuration ?
SNMP v3 must be enabled and configured on all devices.
Download the mib files :
- Mikrotik mib
- Brocade
- Qnap : Go to Control Panel > Network & File Services > SNMP and Under SNMP MIB, click Download.
Don't forget to change in the following configuration :
<snmp_exporter_username>
<snmp_exporter_pass>
<snmp_exporter_private>
snmp-generator.yml |
---|
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 | ---
auths:
homelab_aes:
version: 3
username: "<snmp_exporter_username>"
password: "<snmp_exporter_pass>"
security_level: authPriv
auth_protocol: SHA
priv_protocol: AES
priv_password: "<snmp_exporter_private>"
homelab_des:
version: 3
username: "<snmp_exporter_username>"
password: "<snmp_exporter_pass>"
security_level: authPriv
auth_protocol: SHA
priv_protocol: DES
priv_password: "<snmp_exporter_private>"
modules:
# Default IF-MIB interfaces table with ifIndex.
if_mib:
walk:
- 1.3.6.1.2.1.1.3 # sysUpTime
- 1.3.6.1.2.1.2 # interfaces
- 1.3.6.1.2.1.31.1.1 # ifXTable
lookups:
- source_indexes: [ifIndex]
lookup: ifAlias
- source_indexes: [ifIndex]
lookup: ifDescr
- source_indexes: [ifIndex]
lookup: 1.3.6.1.2.1.31.1.1.1.1
# Mikrotik CCR2004-1g-12s+2xs
mikrotik:
walk:
- 1.3.6.1.2.1.1.3 # sysUpTime
- 1.3.6.1.2.1.2 # interfaces
- 1.3.6.1.2.1.31.1.1 # ifXTable
- 1.3.6.1.4.1.14988 # mikrotik
lookups:
- source_indexes: [ifIndex]
lookup: ifAlias
- source_indexes: [ifIndex]
lookup: ifDescr
- source_indexes: [ifIndex]
lookup: 1.3.6.1.2.1.31.1.1.1.1
# Brocade ICX 6450-24P & ICX 7150-C12P
brocade:
walk:
- 1.3.6.1.2.1.1.3 # sysUpTime
- 1.3.6.1.2.1.2 # interfaces
- 1.3.6.1.2.1.31.1.1 # ifXTable
- 1.3.6.1.4.1.1991.1.1.2.1.11 # snAgImgVer
- 1.3.6.1.4.1.1991.1.1.1.2 # snChasPwr
- 1.3.6.1.4.1.1991.1.1.1.3 # snChasFan
- 1.3.6.1.4.1.1991.1.1.2.11 # snAgentCpu
- 1.3.6.1.4.1.1991.1.1.2.1.53 # snAgentMemUtil
- 1.3.6.1.4.1.1991.1.1.2.13 # snAgentTemp
lookups:
- source_indexes: [ifIndex]
lookup: ifAlias
- source_indexes: [ifIndex]
lookup: ifDescr
- source_indexes: [ifIndex]
lookup: 1.3.6.1.2.1.31.1.1.1.1
# Qnap TS-219 PII
qnap:
walk:
- 1.3.6.1.2.1.1.3 # sysUpTime
- 1.3.6.1.2.1.2 # interfaces
- 1.3.6.1.2.1.31.1.1 # ifXTable
- 1.3.6.1.4.1.24681.1.2.1 #qnap
- 1.3.6.1.4.1.24681.1.2.2 #qnap
- 1.3.6.1.4.1.24681.1.2.3 #qnap
- 1.3.6.1.4.1.24681.1.2.4 #qnap
- 1.3.6.1.4.1.24681.1.2.5 #qnap
- 1.3.6.1.4.1.24681.1.2.6 #qnap
- 1.3.6.1.4.1.24681.1.2.10 #qnap
- 1.3.6.1.4.1.24681.1.2.11 #qnap
- 1.3.6.1.4.1.24681.1.2.12 #qnap
- 1.3.6.1.4.1.24681.1.2.13 #qnap
- 1.3.6.1.4.1.24681.1.2.14 #qnap
- 1.3.6.1.4.1.24681.1.2.15 #qnap
- 1.3.6.1.4.1.24681.1.2.16 #qnap
- 1.3.6.1.4.1.24681.1.2.17 #qnap
- 1.3.6.1.4.1.24681.1.3 #qnap
- 1.3.6.1.4.1.24681.1.4 #qnap
lookups:
- source_indexes: [ifIndex]
lookup: ifAlias
- source_indexes: [ifIndex]
lookup: ifDescr
- source_indexes: [ifIndex]
lookup: 1.3.6.1.2.1.31.1.1.1.1
- source_indexes: [hdIndex]
lookup: hdDescr
|
Follow instructions step from snmp-exporter documentation
Configure snmp-exporter config to use the appropriate crendentials