【Linux】snmp在message中报错: /etc/snmp/snmpd.conf: line 311: Error: ERROR: This output format has been de

Apr 17 17:36:17 localhost snmpd[2810]: /etc/snmp/snmpd.conf: line 311: Error: ERROR: This output format has been deprecated 
- Please use the 'extend' directive instead
Apr 17 17:36:17 localhost snmpd[2810]: /etc/snmp/snmpd.conf: line 314: Error: ERROR: This output format has been deprecated 
- Please use the 'extend' directive instead
Apr 17 17:36:17 localhost snmpd[2810]: /etc/snmp/snmpd.conf: line 315: Error: ERROR: This output format has been deprecated 
- Please use the 'extend' directive instead
Apr 17 17:36:17 localhost snmpd[2810]: /etc/snmp/snmpd.conf: line 316: Error: ERROR: This output format has been deprecated 
- Please use the 'extend' directive instead
Apr 17 17:36:17localhost snmpd[2810]: /etc/snmp/snmpd.conf: line 317: Error: ERROR: This output format has been deprecated 
- Please use the 'extend' directive instead
Apr 17 17:36:17 localhost snmpd[2810]: /etc/snmp/snmpd.conf: line 318: Error: ERROR: This output format has been deprecated 
- Please use the 'extend' directive instead
Apr 17 17:36:17 localhost snmpd[2810]: /etc/snmp/snmpd.conf: line 319: Error: ERROR: This output format has been deprecated 
- Please use the 'extend' directive instead
Apr 17 17:36:17 localhost snmpd[2810]: /etc/snmp/snmpd.conf: line 320: Error: ERROR: This output format has been deprecated 
- Please use the 'extend' directive instead
Apr 17 17:36:17localhost snmpd[2810]: dlopen failed: /lib/lsiRAID.so: cannot open shared object file: No such file or direc
tory
Apr 17 17:36:17localhost snmpd[2810]: net-snmp: 8 error(s) in config file(s)

 

message中现实的问题说明的很明显,找到相关的文件,替换为extend即可

# mysql
#exec .1.3.6.1.4.1.4502.1.6 mysql /usr/local/share/snmp/get-mysql
extend .1.3.6.1.4.1.4502.1.6 mysql /usr/local/share/snmp/get-mysql

# iostat
#exec .1.3.6.1.4.1.8888.2.1 iostat /usr/local/share/snmp/get-iostat sda
#exec .1.3.6.1.4.1.8888.2.2 iostat /usr/local/share/snmp/get-iostat sdb
#exec .1.3.6.1.4.1.8888.2.3 iostat /usr/local/share/snmp/get-iostat sdc
#exec .1.3.6.1.4.1.8888.3.1 iostat-bsd /usr/local/share/snmp/get-iostat-bsd
#exec .1.3.6.1.4.1.8888.4.1 cpustat /usr/local/share/snmp/get-cpustat
#exec .1.3.6.1.4.1.8888.5.1 onlineusers /usr/local/share/snmp/get-statinfo 5min delivery gdeliveryd OnlineUsers 3
#exec .1.3.6.1.4.1.8888.5.2 max-onlineusers /bin/echo 10000

extend .1.3.6.1.4.1.8888.2.1 iostat /usr/local/share/snmp/get-iostat sda
extend .1.3.6.1.4.1.8888.2.2 iostat /usr/local/share/snmp/get-iostat sdb
extend .1.3.6.1.4.1.8888.2.3 iostat /usr/local/share/snmp/get-iostat sdc
extend .1.3.6.1.4.1.8888.3.1 iostat-bsd /usr/local/share/snmp/get-iostat-bsd
extend .1.3.6.1.4.1.8888.4.1 cpustat /usr/local/share/snmp/get-cpustat
extend .1.3.6.1.4.1.8888.5.1 onlineusers /usr/local/share/snmp/get-statinfo 5min delivery gdeliveryd OnlineUsers 3
extend .1.3.6.1.4.1.8888.5.2 max-onlineusers /bin/echo 10000

重启snmpd服务

systemctl restart snmpd

再次查看message日志,日志恢复正常

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值