![4fd750e9ad8c8563d42f9d12303e4ee3.png](https://img-blog.csdnimg.cn/img_convert/4fd750e9ad8c8563d42f9d12303e4ee3.png)
首先获取需要监控的snmp的基本信息,假设基本信息如下:
snmp服务IP: 1.1.1.1snmp community: publicsnmp exportor部署地址: 2.2.2.2
配置snmp exporter
从官方下载snmp exporter的可执行文件。
此外还需要自己编译生成snmp exporter的配置文件,首先需要配置generator.yml文件,然后按照Building和Running中的步骤编译生成snmp.yml。generator.yml文件的配置可以参考File Format。generator.yml文件中只需要注入snmp的community即可,下面仅修改了modules.if_mib.auth字段,其余与File Format中一致。
modules: # Default IF-MIB interfaces table with ifIndex. if_mib: walk: [sysUpTime, interfaces, ifXTable] version: 2 auth: community: public lookups: - source_indexes: [ifIndex] lookup: ifAlias - source_indexes: [ifIndex] lookup: ifDescr - so