Page 1 of 1

SNMPT TRAPS PER HOST \ ALERT

Posted: Tue May 12, 2015 10:04 am
by bmiadmins
Hello,

I have been able to get snmptt working and passing traps up to nagios. However, using the trap wizard I end up with one service per host. What I would like to do is have a service that I could assign to multiple host for a given trap type. The idea is that for JRE, login, and network issues I would have a separate trap service assigned to multiple host. As it is, when a trap is generated for host1 I see only the one alert in the nagios panel. I would like it to layout like the below map:


HOST1 :
TRAP : JRE ISSUES
TRAP : HARDWARE ISSUES

HOST2 :
TRAP : JRE ISSUES
TRAP : HARDWARE ISSUES

In the above, I would like each of the traps to represent one service which I then assign either a host or hostgroup to. Is this possible with traps? Am I looking at changing the EXEC line in snmptt.conf to include a regex or something along those lines? I am may have missed it; however, I have not seen anything which lays out how to achieve this. The current way I have things set will only show the latest trap.


Thanks,

John

Re: SNMPT TRAPS PER HOST \ ALERT

Posted: Tue May 12, 2015 3:06 pm
by ssax
You would want to edit your /etc/snmp/snmptt.conf and change the EXEC line for the OID's you want to have different service names, as an example, you would change:

Code: Select all

"SNMP Traps"
To:

Code: Select all

"SNMP Traps - JRE ISSUES"
You can add a MATCH to those to fire on specific information contained in the trap if you need duplicate OIDs that fire on different text.
http://snmptt.sourceforge.net/docs/snmp ... CONF-MATCH

Re: SNMPT TRAPS PER HOST \ ALERT

Posted: Wed May 13, 2015 8:53 am
by bmiadmins
Hello,

Thanks very much for the reply on this. Your help has been greatly appreciated!

Re: SNMPT TRAPS PER HOST \ ALERT

Posted: Wed May 13, 2015 9:25 am
by lmiltchev
bmiadmins, can we lock this topic and mark it as "resolved"?

Re: SNMPT TRAPS PER HOST \ ALERT

Posted: Wed May 20, 2015 11:18 am
by bmiadmins
Hello,

Yes, please mark his as resolved.


Thanks again for the help!