Sending SNMP traps from icinga2 => TrapX

I’m working on implementation sending SNMP traps by Icinga2 toward TrapX. I’d created EventCommand object and simple script to check event command itself. I understand, for sending tarps i need create/use Icinga2 OID/MIBs for my alert events.

Can I use MIBs created by me or Icinga2 uses own OID/MIBs?
Can Icinga2 generate MIBs files based on existing events in Icinga2 itself (service/hardware states or triggers)?

Many thanks for any information

Icinga 2 doesn’t know anything about MIBs and won’t generate such. I would also advise against event commands, as they are only executed on state changes, and not e.g. on a new check result itself. Furthermore, you can use reliable http techniques with the REST API and event streams in a better way.

The question remains, what exactly would be needed in such a MIB, as lots of the data is rather generic (host, service, output, perfdata, state_type, etc.)

Do you have any details on TrapX, how it expects such traps being sent, or does it have sort of dynamic mapping/aggregation?

dnsmichi, thank for your answer.

TrapX team asked me about icinga2 MIB files, i think for import to Spectrum monitoring tool (they are going use Icinga2 as source of alert => TrapX => Spectrum).

I used this command to checking traps send/receive inside
snmptrap -v 2c -c COMMUNITY TrapX_IPs OID TYPE VALUE

I think, I need clarify this part OID TYPE VALUE and send them list like

As there is no official MIB, you probably need to create a custom one, if the tool really relies on that. That also involves to choose an OID prefix for that matter.

TrapX seems like a commercial tool with no public docs about interfaces. That’s a tough one then.

Thank you for clarification.
I think, I will begin create own OID list like this

As I see, Your answer was confirmed my next steps. I have heard same recommendations from another people.

Many thanks for this conversation

Have a look at

for a base snmp mib in icinga2.

It includes definition for attributes and objects that are usefull in icinga2.
Also notification definition for sending traps to an snmp trap receiver.

Give a try send some feedback.