【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日志,日志恢复正常

上一篇:Laravel ---【转】PhpStorm下Laravel代码智能提示


下一篇:【ERROR】EXP-00091