Jump to content

Recommended Posts

Posted

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.

http://manpages.ubuntu.com/manpages/hardy/man1/snmptrap.1.html

 

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?

 

Ta.

Posted (edited)

Managed to get it working, so Ubuntu server is now sending SNMP traps to the monitoring server when my bash scripts see something wrong.

Phew!

 

This example was of some use:

 

$snmptrap -v 1 -c public  '1.2.3.4.5.6' '192.193.194.195' 6 99 '55' 1.11.12.13.14.15  s "teststring"

 

This was decoded as a workable trap by Argent. From its log:

 

Following SNMP trap is received but matching none criteria of production SNMP

Trap Monitor: Trap generic=6 specific=99

Enterprise Oid=.iso.2.3.4.5.6 (.1.2.3.4.5.6)

From (127.0.0.1)

Variable (String) = .iso.11.12.13.14.15 (.1.11.12.13.14.15)

Value = teststring

 

It's not a proper MIB of course, but I just wanted to raise a text alert. It seems to have worked.

Edited by jinnantonnixx

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...