Vote 0 Votes

環境 CentOS

編輯 /etc/snmp/snmptrapd.conf
disableAuthorization yes
traphandle default mail -s trap
# 若要認 Community, 就設定 authCommunity
# traphandle 指 trap 發生時, 要交由那支程式處理, default 指所有 trap 都收,
# 也可以指定 OID, 例如: traphandle IF-MIB::linkDown program
# 本例是寄 Mail 出來, 可以自行寫程式進行處理

編輯 /etc/sysconfig/snmptrapd.options, 若沒有這個檔, 則編輯 /etc/init.d/snmptrapd
OPTIONS="-Ls3 -p /var/run/"
# -Ls3 指記錄到 syslog local3

編輯 /etc/syslog.conf, 指定 local3 log file
local3.* /var/log/snmptrapd.log

service snmptrapd start
service syslog restart

Leave a comment

About this Entry

This page contains a single entry by Pank published on April 28, 2010 1:11 PM.

SONY HDR-CX350 was the previous entry in this blog.

nothing.exe is the next entry in this blog.

Find recent content on the main index or look in the archives to find all content.