= SNMP = == SNMPv3 Agent == Ref * [https://pysnmp.readthedocs.io/en/latest/quick-start.html, 1] * [https://github.com/etingof/pysnmp/tree/release-4.4.10/examples/v3arch/asyncore/agent/cmdrsp, 2] We use example in observe-request-processing.py and test with {{{ #!sh [krit@mini tmp]$ snmpwalk -v3 -u usr-md5-des -l authPriv -A authkey1 -X privkey1 localhost .1.3.6 }}} == SNMPv3 send trap == Ref * [https://support.nagios.com/kb/article/snmp-trap-how-to-send-a-test-trap-493.html, 1] At server, we edit file /etc/snmp/snmptrapd.conf {{{ #!sh [root@mini snmp]# more snmptrapd.conf # use for response to snmpwalk/snmpget with community "public" authCommunity log,execute,net public # use for daemon waiting to receive snmptrap v3 disableAuthorization yes traphandle default /usr/sbin/snmptthandler createUser -e 0x090807060504030201 the_user_name SHA the_SHA_string AES the_AES_string authUser log,execute,net the_user_name }}} Then we run snmpd waiting for trap {{{ #!sh [root@mini snmp]# snmptrapd -f -Le NET-SNMP version 5.7.3 }}} On client that we would like to send trap to server run following command {{{ #!sh [krit@mini ~]$ snmptrap -v 3 -e 0x090807060504030201 -u the_user_name -a SHA -A the_SHA_string -x AES -X the_AES_string -l authPriv localhost '' 1.3.6.1.4.1.8072.2.3.0.1 1.3.6.1.4.1.8072.2.3.2.1 i 123456 }}}