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 | ---
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
|
Follow instructions step from snmp-exporter documentation
Configure snmp-exporter config to use the appropriate crendentials