Ad Widget

Collapse

SNMP Traps

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Beginner
    Junior Member
    • Feb 2017
    • 10

    #1

    SNMP Traps

    Hello dear friends,

    I'm trying to get SNMP Traps to work, but am having alot of struggles with configuring so.


    I am working on an Ubuntu machine and have followed this guide https://www.zabbix.org/wiki/Start_wi...raps_in_Zabbix
    everything is basically the same expect for the package installations. And i didn't use the 2.2.1 version of the perl script but the 3.2.4 version, since i'm running zabbix on that version.

    I did try everything and got it eventually to work, but as soon as i cheered, it got stuck again after rebooting. If i'm looking at my zabbix_server log there is an error saying:
    Cannot stat file "tmp/zabbix_traps.tmp" no such file or directory.

    When i manually create this file, i won't get the errors but the tmp file won't get filled with data of the received traps.

    Also i've allowed port 161/udp and 162/udp with UFW and rebooted the machine.

    Any ideas and help is appreciated
    Bye

    EDIT: Also these are the steps i did when trying to achieven snmp trapping

    1. put zabbix trap receiver perl fil in /usr/bin and add execute permission in the perl file the trapping directory is /tmp/zabbix_traps.tmp
    2. add following lines to /etc/snmp/snmptrapd.conf

    authCommunity execute public
    authCommunite execute ZabbixServer
    perl do "/usr/bin/zabbix_trap_receiver.pl";

    3. enable snmp trapping in zabbix_server.conf and define tmp file

    StartSNMPTrapper=1
    SNMPTrapperFile=/tmp/zabbix_traps.tmp

    4. Add the MIB I want to use to /usr/share/snmp/mibs (DELL-SHADOW-MIB.txt) and define it in the /etc/snmp/snmp.conf with mibs +DELL-SHADOW-MIB
    5. Reboot and enable services snmptt snmptrapd snmpd
    Last edited by Beginner; 28-03-2017, 15:48.
  • mzamora
    Junior Member
    • Oct 2017
    • 6

    #2
    Did you check the permissions on your "tmp/zabbix_traps.tmp" file? I had this issue as well. Maybe the user does not have rights to write to the tmp file.

    I made sure that the user that is running my zabbix_server process (in my case, the group is zabbix and the user is zabbix), has ownership of the zabbix_traps.tmp file.

    So I ran:
    chown -R zabbix:zabbix tmp/zabbix_traps.tmp

    Comment

    Working...