Results 1 to 1 of 1
Hi there,
I currently have a string which traps perfectly in my snmp trap manager and it displays the hosts name that the error occurred on.
Trapped Message:
%CATD_I_060, SNMPTRAP: ...
- 03-09-2011 #1Just Joined!
- Join Date
- Mar 2011
- Posts
- 2
snmptrap variables
Hi there,
I currently have a string which traps perfectly in my snmp trap manager and it displays the hosts name that the error occurred on.
Trapped Message:
%CATD_I_060, SNMPTRAP: -c public unknown 10.33.xx.xxx UNRESOLVED 6 1 0:00:10 1 OID: 1.3.6.1.4 .iso.org.dod.internet.private VALUE: DMADMIN02
What im struggling with is adding another variable onto that, like a service description $SERVICEDESC or service state $SERVICESTATE after it.
This is what i've tried. (im using nagios as my monitoring tool)
snmptrap -v 1 -d -c public 172.20.xx.xx .1.3.6.1.4 10.33.xx.xxx 6 1 1000 .1.3.6.1.4 s $HOSTNAME (works perfectly, displays the hosts name)
snmptrap -v 1 -d -c public 172.20.xx.xx .1.3.6.1.4 10.33.xx.xxx 6 1 1000 .1.3.6.1.4 s $HOSTNAME $HOSTADDRESS (traps with the localhosts name)
snmptrap -v 1 -d -c public 172.20.xx.xx .1.3.6.1.4 10.33.xx.xxx 6 1 1000 .1.3.6.1.4 s $HOSTNAME $SERVICEDESC (traps with the localhosts name)
snmptrap -v 1 -d -c public 172.20.xx.xx .1.3.6.1.4 10.33.xx.xxx 6 1 1000 .1.3.6.1.4 s $HOSTADDRESS (complains about a missing\type variable)
All im struggling with now is maybe not necessarily adding another variable, which would be preferable, but even just adding my own text after $HOSTNAME will work fine.
Thanks in advance
MrD


Reply With Quote