Nagios and SNMP traps

It has been explained many times over the internet, so I won’t cover that.

One thing you have to pay attention to is, if you run snmptt as a daemon, be sure that it has the right to write to Nagios FIFO. On my Debian system, I had to run snmptt as nagios user.

Then, when you convert the MIBs to snmptt.conf file format, sometimes it will fail because the MIB is not RFC compliant. Most of the times, object definitions contain underscores (_) or dots (.) . Just sed them.

Also, I find some traps a bit strange. Like Veeam Backup & Replication traps, there is only one trap for Success, Warning and Failed backup events. So it’s not like the status of switch port where you get one trap for linkDown and one trap for linkUp.
I ended up with a simple wrapper called by snmptt to extract the trap status and then send the correct status to Nagios.

I guess I will find other strange things as I add more and more traps to the system.

This entry was posted in Computer, Linux, Networking, Virtualization. Bookmark the permalink.

One Response to Nagios and SNMP traps

  1. Richard Wall says:

    Hi,

    I’ve trying to get Veeam Backups working into Nagios and I’m not convinced my snmptt.conf file is correct.

    Can I see your Veam mib entries to cross reference please.

    Currently I have:
    MIB: VEEAM-MIB (file:/usr/share/snmp/mibs/VeeamBackup.mib) converted on Wed Jul 16 11:02:24 2014 using snmpttconvertmib v1.2
    #
    #
    #
    EVENT onBackupJobCompleted .1.3.6.1.4.1.31023.1.1.1.0.1 “Status Events” Normal
    FORMAT $*
    EXEC /usr/local/nagios/plugins/submit_check_result $r Veeam-Backup-Trap 2 “$*”
    SDESC

    This trap is sent on backup/replica job completed.
    Variables:
    1: backupJobId
    2: backupJobName
    3: backupJobResult
    4: backupJobComment
    EDESC
    #
    #
    #
    EVENT onVmBackupCompleted .1.3.6.1.4.1.31023.1.1.1.0.2 “Status Events” Normal
    FORMAT $*
    EXEC /usr/local/nagios/plugins/submit_check_result $r Veeam-Backup-Trap 2 “$*”
    SDESC

    This trap is sent on vm backup/replica completed.
    Variables:
    1: backupJobName
    2: vmName
    3: sourceHostName
    4: vmBackupResult
    5: vmBackupComment
    EDESC

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.