maxwo/snmp_notifier

Can't find the MIB file

ronshuli opened this issue · 3 comments

Hey,

I am trying to get the MIB file of the SNMP notifier with no luck,

where can I find this file?

maxwo commented

Hello Ron,

It is true I haven't provided any MIB file. I should provide one for the default trap used in SNMP notifier.

But keep in mind that it is often better to create your own, by adding an OID to the alerts labels, or customize the default one with your own.

Here is a sample based on one I used in a real world project, for all alerts that come from a hosted Consul cluster:

OSS-CONSUL-MIB DEFINITIONS ::= BEGIN

    IMPORTS
        enterprises, MODULE-IDENTITY, NOTIFICATION-TYPE FROM SNMPv2-SMI;

    oss MODULE-IDENTITY
        LAST-UPDATED "201804030000Z"
        ORGANIZATION "OSS"
        CONTACT-INFO
            "Github
            https://www.github.com
            "
        DESCRIPTION
            "oss consul oid mib defintion. "

--  Revision history201804030000Z
        REVISION    "201804030000Z"
        DESCRIPTION "V1.00, Begins draft."
        ::= { enterprises 666 }

    ossFirstLevel                           OBJECT IDENTIFIER ::= { oss 0 }
        ossSecondLevel                      OBJECT IDENTIFIER ::= { ossFirstLevel 10 }
            software                        OBJECT IDENTIFIER ::= { ossSecondLevel 1 }
                traps                       OBJECT IDENTIFIER ::= { software 1 }
                    middleware              OBJECT IDENTIFIER ::= { traps 1 }
                        consul              OBJECT IDENTIFIER ::= { middleware 2 }
                            consulEvent                      NOTIFICATION-TYPE
                                STATUS current
                                DESCRIPTION ""
                                ::= { consul 1 }

END

The thing about using your own traps and OIDs is that you can easily dispatch them among several services in your nagios/centreon, and then trigger several kinds of processes depending on the alert/alert group that triggered the alert.

Let me know if you need any additional help.

Thanks for your interest.

Cheers.

Hi,

I have MIB file with me, but how to provide that MIB file to snmp-notifier?

maxwo commented

MIB file has been added in the mibs/ directory of the repository. Enjoy :)