snmptrap v2 to v3
Posted: Fri Feb 25, 2022 8:00 am
Hello
im having issues sending snmptraps in v3.
I have a misc command (used as event handler). Current snmp v2 working one:
/usr/bin/snmptrap -v 2c -c communityname IP:167 '' 1.3.6.1.4.1.48522.7717 1.3.6.1.4.1.48522.7717.119.0 s "$NOTIFICATIONTYPE$" 1.3.6.1.4.1.48522.7717.50.0 s "$SERVICEDESC$" 1.3.6.1.4.1.48522.7717.1.0 s "$HOSTNAME$" 1.3.6.1.4.1.48522.7717.4.0 s "$HOSTADDRESS$" 1.3.6.1.4.1.48522.7717.52.0 s "$SERVICESTATE$" 1.3.6.1.4.1.48522.7717.130.0 s "$LONGDATETIME$" 1.3.6.1.4.1.48522.7717.78.0 s "$SERVICEOUTPUT$" 1.3.6.1.4.1.48522.7717.125.0 s "$NOTIFICATIONCOMMENT$"
Now i was asked to move it to v3 but it doesnt seem to be working
/usr/bin/snmptrap -v3 -e 0x090807060504030201 -u username -a SHA -A password -x AES -X password -l authPriv IP:167 '' 1.3.6.1.4.1.48522.7717 1.3.6.1.4.1.48522.7717.119.0 s "$NOTIFICATIONTYPE$" 1.3.6.1.4.1.48522.7717.50.0 s "$SERVICEDESC$" 1.3.6.1.4.1.48522.7717.1.0 s "$HOSTNAME$" 1.3.6.1.4.1.48522.7717.4.0 s "$HOSTADDRESS$" 1.3.6.1.4.1.48522.7717.52.0 s "$SERVICESTATE$" 1.3.6.1.4.1.48522.7717.130.0 s "$LONGDATETIME$" 1.3.6.1.4.1.48522.7717.78.0 s "$SERVICEOUTPUT$" 1.3.6.1.4.1.48522.7717.125.0 s "$NOTIFICATIONCOMMENT$"
The receiving end sees something coming but its unreadable. What type of AES is used? Do i need to do some more configuration in nagios serverside? Do i need to configure the user in /etc/snmp/snmptrapd.conf also or the receiving end needs to configure it?
im having issues sending snmptraps in v3.
I have a misc command (used as event handler). Current snmp v2 working one:
/usr/bin/snmptrap -v 2c -c communityname IP:167 '' 1.3.6.1.4.1.48522.7717 1.3.6.1.4.1.48522.7717.119.0 s "$NOTIFICATIONTYPE$" 1.3.6.1.4.1.48522.7717.50.0 s "$SERVICEDESC$" 1.3.6.1.4.1.48522.7717.1.0 s "$HOSTNAME$" 1.3.6.1.4.1.48522.7717.4.0 s "$HOSTADDRESS$" 1.3.6.1.4.1.48522.7717.52.0 s "$SERVICESTATE$" 1.3.6.1.4.1.48522.7717.130.0 s "$LONGDATETIME$" 1.3.6.1.4.1.48522.7717.78.0 s "$SERVICEOUTPUT$" 1.3.6.1.4.1.48522.7717.125.0 s "$NOTIFICATIONCOMMENT$"
Now i was asked to move it to v3 but it doesnt seem to be working
/usr/bin/snmptrap -v3 -e 0x090807060504030201 -u username -a SHA -A password -x AES -X password -l authPriv IP:167 '' 1.3.6.1.4.1.48522.7717 1.3.6.1.4.1.48522.7717.119.0 s "$NOTIFICATIONTYPE$" 1.3.6.1.4.1.48522.7717.50.0 s "$SERVICEDESC$" 1.3.6.1.4.1.48522.7717.1.0 s "$HOSTNAME$" 1.3.6.1.4.1.48522.7717.4.0 s "$HOSTADDRESS$" 1.3.6.1.4.1.48522.7717.52.0 s "$SERVICESTATE$" 1.3.6.1.4.1.48522.7717.130.0 s "$LONGDATETIME$" 1.3.6.1.4.1.48522.7717.78.0 s "$SERVICEOUTPUT$" 1.3.6.1.4.1.48522.7717.125.0 s "$NOTIFICATIONCOMMENT$"
The receiving end sees something coming but its unreadable. What type of AES is used? Do i need to do some more configuration in nagios serverside? Do i need to configure the user in /etc/snmp/snmptrapd.conf also or the receiving end needs to configure it?