我正在尝试从 CentOS 6.5 服务器中的 amavis 获取值。
这些值,例如垃圾邮件(总数、总数/小时、百分比),应该可以通过 SNMP 访问。
但是,当我运行 snmpwal 时,我总是得到 0 作为值(示例):
AMAVIS-MIB::inMsgsInbound.0 = Counter32: 0
AMAVIS-MIB::sysUpTime.0 = Timeticks: (0) 0:00:00.00
为此,我在服务器中设置了 snmpd。这是我的 snmpd.conf
rocommunity snmp@key 192.168.1.12
rocommunity snmp@key 127.0.0.1
# sec.name source community
com2sec notConfigUser default public
# groupName securityModel securityName
#group notConfigGroup v1 notConfigUser
group notConfigGroup v2c notConfigUser
# name incl/excl subtree mask(optional)
view systemview included .1.3.6.1.2.1.1
view systemview included .1.3.6.1.2.1.25.1.1
view systemview included .1.3.6.1.4.1.15312.2.1
# group context sec.model sec.level prefix read write notif
access notConfigGroup "" any noauth exact systemview none none
access notConfigGroup "" any noauth exact agentx none none
syslocation Unknown (edit /etc/snmp/snmpd.conf)
syscontact Root <root@localhost> (configure /etc/snmp/snmp.local.conf)
dontLogTCPWrappersConnects yes
master agentx
agentXSocket tcp:127.0.0.1:705
amavisd-new-snmp
我还通过安装包并复制AMAVIS-MIB.txt
来设置 amavis agentx/usr/share/snmp/mibs/
所有进程都已启动,我在 Google 上搜索了一段时间,但没有找到任何信息。如有任何想法,我将不胜感激