This might help:
TUT:snmptrap - Net-SNMP Wiki
I need to send an SNMP trap (just a general one, with a bit of text to be flagged up on 'Argent' monitoring server) from Ubuntu server.
I've looked at the help on SNMPTRAP, and found it to be worse than useless.
Would a useful example have killed them? Their example doesn't seem to work anyway, it's done more to annoy me than enlighten me.
Has anyone got a cheatsheet for SNMPTRAP?
jinnantonnixx (16th August 2011)
That's quite useful. I had hoped to just short-cut it without understanding it, but it seems I'll have to know what I'm doing to get this to work.
Managed to get it working, so Ubuntu server is now sending SNMP traps to the monitoring server when my bash scripts see something wrong.
This example was of some use:
This was decoded as a workable trap by Argent. From its log:Code:$snmptrap -v 1 -c public <snmp-server> '126.96.36.199.5.6' '188.8.131.52' 6 99 '55' 184.108.40.206.14.15 s "teststring"
It's not a proper MIB of course, but I just wanted to raise a text alert. It seems to have worked.Following SNMP trap is received but matching none criteria of production SNMP
Trap Monitor: Trap generic=6 specific=99
Enterprise Oid=.iso.220.127.116.11.6 (.18.104.22.168.5.6)
Variable (String) = .iso.22.214.171.124.15 (.126.96.36.199.14.15)
Value = teststring
Last edited by jinnantonnixx; 16th August 2011 at 10:50 AM.
There are currently 1 users browsing this thread. (0 members and 1 guests)