SNMPTrap Service Setup

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
dslaughter
Posts: 140
Joined: Wed Feb 20, 2019 3:46 pm

SNMPTrap Service Setup

Post by dslaughter »

I've read the snmp docs from nagios but I'm still have a question. How do I configure services? Does each host that sends a trap have a snmptrap service defined or only the trap receiver?
User avatar
cdienger
Support Tech
Posts: 5045
Joined: Tue Feb 07, 2017 11:26 am

Re: SNMPTrap Service Setup

Post by cdienger »

Each host that sends in snmp traps should have their own passive services that handle the snmp traps. You can configure multiple traps to send to the same passive service, but most of the time you'll want to have snmp traps send to their own passive service.

Have you seen https://www.youtube.com/watch?v=3cpMf5Tl04Y? It goes through adding services.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
dslaughter
Posts: 140
Joined: Wed Feb 20, 2019 3:46 pm

Re: SNMPTrap Service Setup

Post by dslaughter »

Thanks for the video. It was pretty good but I'm still not 100% clear on service setup.

For every host that SENDS traps should have a single passive snmp trap service configured.

The trap RECEIVER is not required to have a passive snmp trap service configured unless the host is also sending traps. My receiver is the nagiosxi server itself.

Is that correct?
User avatar
cdienger
Support Tech
Posts: 5045
Joined: Tue Feb 07, 2017 11:26 am

Re: SNMPTrap Service Setup

Post by cdienger »

The trap RECEIVER is not required to have a passive snmp trap service configured unless the host is also sending traps.
Correct.

Code: Select all

For every host that SENDS traps should have a single passive snmp trap service configured.
The receiver should be configured with at least one passive service. The receiver can accept all traps on a single passive service, but if there are a lot of different traps it isn't ideal. For example, a sender may send a trap for CPU usage and another trap for disk usage. With a single trap setup for both, if a critical trap comes in for the CPU and then a warning trap comes in for the disk usage, the Nagios system will display the status of the disk usage trap(the last one to come in). It makes more sense to have two passive checks - one for the CPU trap and the other for disk usage. Traps are usually differentiated with with OIDs which then can have their own passive service. You can also use advanced criteria to dictate if an incoming trap triggers a passive service on the XI system. For example, the MATCH operator. See http://snmptt.sourceforge.net/docs/snmp ... ile-format for details on that, but I'd focus on setting services passed on trap OIDs first and only add advanced config if necessary.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
dslaughter
Posts: 140
Joined: Wed Feb 20, 2019 3:46 pm

Re: SNMPTrap Service Setup

Post by dslaughter »

Is it possible to have a default service on the receiver to log all traps that have not been defined so I don't miss any traps? I tried to set this up but couldn't get it to work.
User avatar
mbellerue
Posts: 1403
Joined: Fri Jul 12, 2019 11:10 am

Re: SNMPTrap Service Setup

Post by mbellerue »

There are a couple of places where traps can get trapped.

If the system doesn't have a valid OID for the trap, the trap will get logged in /var/log/snmptt/snmpttunknown.log. You could monitor this file by datetime since modification, or one of the check_log plugins.

If the system has a valid OID for the trap, but Nagios doesn't have a host/service configured for it, it will get logged in /usr/local/nagiosxi/var/corelog.newobjects. You can use similar methods to monitor this file.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.

Be sure to check out our Knowledgebase for helpful articles and solutions!
dslaughter
Posts: 140
Joined: Wed Feb 20, 2019 3:46 pm

Re: SNMPTrap Service Setup

Post by dslaughter »

ok, thanks for the info. Go ahead and lock this. I'm going to start watching that log. If I have any problems I'll start a new thread.
Locked