因为不是监控交换机,所以不用编译配置文件只需要用github上打包好的release直接运行
https://github.com/prometheus/snmp_exporter
bashscrape_configs:
- job_name: 'ikuai_snmp'
static_configs:
- targets:
- 1.2.3.4 # SNMP device.
metrics_path: /snmp
params:
module: [if_mib]
relabel_configs:
- source_labels: [__address__]
target_label: __param_target
- source_labels: [__param_target]
target_label: instance
- target_label: __address__
replacement: 1.2.3.4:9116 #snmp_exporter服务器
如果需要监控交换机则需要编译mib和配置文件,需要安装go环境