Create a new host and set the IP address from which the traps has been allowed to come:
To find out the external IP I can use:
curl https://www.myexternalip.com/raw
Assign template:
The template contains items:
Go to your host (IP you set before) and execute the command:
snmptrap -v 1 -c public ec2-35-166-97-138.us-west-2.compute.amazonaws.com '.1.3.6.1.6.3.1.1.5.4' '0.0.0.0' 6 33 '55' .1.3.6.1.6.3.1.1.5.4 s "test"
To to deliver SNMPv2 trap use:
snmptrap -Ci -v 2c -c public ec2-35-166-97-138.us-west-2.compute.amazonaws.com "" "NET-SNMP-MIB::netSnmpExperimental" NET-SNMP-MIB::netSnmpExperimental s "are you there"
thanks, saved my day
ReplyDelete