1
Linux 討論版 / Re: 如何限制 snmp 的數據發送??
« 於: 2020-08-21 17:32 »
自答一下,
第一個問題,在 snmpd.conf 中原 proxy -Cn test -v 2c -c community 61.64.126.251 .1.3.6.1.2.1.31.1.1.1.10
改為 proxy -Cn test -v 2c -c community 10.1.1.1 .1.3.6.1.2.1.31.1.1.1.10.561
view 部分照問題裡說的設定不變動,這樣使用 snmpget -v2c -c community 10.1.1.1 .1.3.6.1.2.1.31.1.1.1.10.561只會秀出廠商要的數據,
使用 snmpget -v2c -c community 10.1.1.1 .1.3.6.1.2.1.31.1.1.1.10 或
snmpwalk -v2c -c community 10.1.1.1 .1.3.6.1.2.1.31.1.1.1.10.561 或
snmpwalk -v2c -c community 10.1.1.1 .1.3.6.1.2.1.31.1.1.1.10 都不會得到資料
第二問題,在 /etc/sysconf/snmpd 中原 # OPTIONS="-LS0-6d"
修改成 OPTIONS="-Le -d"
重啟 snmpd 後messages 中可以獲得snmp 的完整紀錄。
謝謝。
第一個問題,在 snmpd.conf 中原 proxy -Cn test -v 2c -c community 61.64.126.251 .1.3.6.1.2.1.31.1.1.1.10
改為 proxy -Cn test -v 2c -c community 10.1.1.1 .1.3.6.1.2.1.31.1.1.1.10.561
view 部分照問題裡說的設定不變動,這樣使用 snmpget -v2c -c community 10.1.1.1 .1.3.6.1.2.1.31.1.1.1.10.561只會秀出廠商要的數據,
使用 snmpget -v2c -c community 10.1.1.1 .1.3.6.1.2.1.31.1.1.1.10 或
snmpwalk -v2c -c community 10.1.1.1 .1.3.6.1.2.1.31.1.1.1.10.561 或
snmpwalk -v2c -c community 10.1.1.1 .1.3.6.1.2.1.31.1.1.1.10 都不會得到資料
第二問題,在 /etc/sysconf/snmpd 中原 # OPTIONS="-LS0-6d"
修改成 OPTIONS="-Le -d"
重啟 snmpd 後messages 中可以獲得snmp 的完整紀錄。
謝謝。