snmp trap sender component
snmp trap sender component
Short of seeing a trap at the destination, is there a way to verify snmp traps sent by enabling the snmp trap sender component are actually being sent? Are they logged somewhere? Also, what would it take for sent traps to also show up in the notification log?
-
slansing
- Posts: 7698
- Joined: Mon Apr 23, 2012 4:28 pm
- Location: Travelling through time and space...
Re: snmp trap sender component
Traps should be being logged already check the following directory:
As far as a specific trap sender log, I'll need to look into that, not sure if sent traps show up in those logs by default, or at all.
Code: Select all
/var/log/snmptt/Re: snmp trap sender component
I'm fairly certain /var/log/snmptt.log is for incoming traps. In any event, the trap I know that was sent is not in that log.
-
sreinhardt
- -fno-stack-protector
- Posts: 4366
- Joined: Mon Nov 19, 2012 12:10 pm
Re: snmp trap sender component
You are correct, snmptt.log is for KNOWN traps, ones that are correctly interpreted by snmptt and snmptrapd. snmpttunknown.log is for traps that are UNKNOWN and are not being interpreted correctly. Are you seeing that trap in the unknown log? I have not been able to find an actual log file for the event handler, however you can run:
This will show outgoing and incoming snmptraps.
Code: Select all
tcpdump -i eth0 port 162Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.
Re: snmp trap sender component
Yes, the sent traps were in the snmpttunknown.log, that is how I knew traps were being sent because I set the destination back to itself. I know the snmpttunknown.log only displayed incoming traps because the sent traps did not show up there until I turned on the trap receiving component.
-
sreinhardt
- -fno-stack-protector
- Posts: 4366
- Joined: Mon Nov 19, 2012 12:10 pm
Re: snmp trap sender component
Most likely, we just need to add the nagios mibs to your snmptt.conf. Running the following commands should do it. Once it does, please check snmptt.log for new entries from nagios.
Code: Select all
addmib /usr/local/nagiosxi/html/includes/components/snmptrapsender/mibs/NAGIOS-ROOT-MIB.txt
addmib /usr/local/nagiosxi/html/includes/components/snmptrapsender/mibs/NAGIOS-NOTIFY-MIB.txt
service snmptt restart; service snmptrapd restartNagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.
Re: snmp trap sender component
Thanks but I'm not actually concerned about receiving or processing the incoming traps. I'm only concerned about proof that the outgoing traps were generated and sent. We will eventually be sending those traps to a netcool objectserver and the ability to verify a trap was sent will be important. It would be most helpful if outgoing traps were logged somewhere.sreinhardt wrote:Most likely, we just need to add the nagios mibs to your snmptt.conf. Running the following commands should do it. Once it does, please check snmptt.log for new entries from nagios.Code: Select all
addmib /usr/local/nagiosxi/html/includes/components/snmptrapsender/mibs/NAGIOS-ROOT-MIB.txt addmib /usr/local/nagiosxi/html/includes/components/snmptrapsender/mibs/NAGIOS-NOTIFY-MIB.txt service snmptt restart; service snmptrapd restart
-
sreinhardt
- -fno-stack-protector
- Posts: 4366
- Joined: Mon Nov 19, 2012 12:10 pm
Re: snmp trap sender component
Well, them showing in snmpttunknown.log is proof that they were received by snmptrapd and processed by snmptt, and therefore sent by snmptrap sending component. If you wish to have additional logging or something of that nature, I would ask that you submit a feature request to tracker.nagios.com so that you may view its progress. Otherwise you likely can look in the nagios event log for times when global event handlers were executed.
Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.