Ad Widget

Collapse

SNMP Trapping Centos 8 - Zabbix not picking up the data/traps from trapper file

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • reidarostrem
    Junior Member
    • Oct 2020
    • 3

    #1

    SNMP Trapping Centos 8 - Zabbix not picking up the data/traps from trapper file

    Hi all,

    I would appreciate some guidance and help around this topic as I can't seem to figure out how to manage this on my own.

    We have Zabbix 4.4.6 running in production on a Centos 8 VM, and i would like to enable SNMP trapping on production server. But to avoid problems I downloaded the Zabbix Appliance (CentOS8) to do some testing before deploying.

    I am aware of the perl issues with Centos8, and have landed on a script by Opensource ICT Solutions - the bash version.
    The script works fine and writes the SNMP traps to my tempfile, my issue is that Zabbix is not picking up the data ..
    Tried moving the file from /tmp to another directory without luck.

    The tests i've done is with the Zabbix Appliance it's self by adding SNMPTrap item in the hosts configuration, no data is displayed in the history of this item. Been using snmptrap.fallback.

    Is there anyone that have successfully implemented SNMP trapping in Centos8 ?

    Thanks in advance.

    Reidar
  • reidarostrem
    Junior Member
    • Oct 2020
    • 3

    #2
    Originally posted by reidarostrem
    Hi all,

    I would appreciate some guidance and help around this topic as I can't seem to figure out how to manage this on my own.

    We have Zabbix 4.4.6 running in production on a Centos 8 VM, and i would like to enable SNMP trapping on production server. But to avoid problems I downloaded the Zabbix Appliance (CentOS8) to do some testing before deploying.

    I am aware of the perl issues with Centos8, and have landed on a script by Opensource ICT Solutions - the bash version.
    The script works fine and writes the SNMP traps to my tempfile, my issue is that Zabbix is not picking up the data ..
    Tried moving the file from /tmp to another directory without luck.

    The tests i've done is with the Zabbix Appliance it's self by adding SNMPTrap item in the hosts configuration, no data is displayed in the history of this item. Been using snmptrap.fallback.

    Is there anyone that have successfully implemented SNMP trapping in Centos8 ?

    Thanks in advance.

    Reidar

    Ok, just to update my own question due to the lack of response.
    Started fresh again, reverted to the perl script "zabbix_trap_receiver.pl" ..

    Finally got net-snmp-perl to install. Not sure what did the trick, but solution below:

    1. dnf install https://dl.fedoraproject.org/pub/epe...t-8.noarch.rpm
    2. rpm -Uvh http://repo.okay.com.mx/centos/8/x86...el8.noarch.rpm
    3. yum install -y net-snmp-perl <- this is where the problem originally started, no providers
    4. put the script in /etc/zabbix/snmptrapper/
    5. put the temp log file in /etc/zabbix/snmptrapper/


    Comment

    • tim.mooney
      Senior Member
      • Dec 2012
      • 1427

      #3
      So, snmptrapd is able to write to the file, correct? You're seeing TRAP messages written to that file?

      You've modified /etc/zabbix/zabbix_server.conf and set SNMPTrapperFile=/etc/zabbix/snmptrapper/whatever_your_file_is_called and you've also set StartSNMPTrapper to at least 1 , and then restarted the zabbix_serverd services? If you run 'ps' on your Zabbix server and look at the zabbix processes, there's at least one 'snmp trapper' in the list?

      Have you created an snmptrap.fallback[] item, to ensure that Zabbix catches items that aren't matching whatever snmptrap items you've set up?

      Is SELinux enabled?

      Comment

      • reidarostrem
        Junior Member
        • Oct 2020
        • 3

        #4
        Originally posted by tim.mooney
        So, snmptrapd is able to write to the file, correct? You're seeing TRAP messages written to that file?

        You've modified /etc/zabbix/zabbix_server.conf and set SNMPTrapperFile=/etc/zabbix/snmptrapper/whatever_your_file_is_called and you've also set StartSNMPTrapper to at least 1 , and then restarted the zabbix_serverd services? If you run 'ps' on your Zabbix server and look at the zabbix processes, there's at least one 'snmp trapper' in the list?

        Have you created an snmptrap.fallback[] item, to ensure that Zabbix catches items that aren't matching whatever snmptrap items you've set up?

        Is SELinux enabled?
        Hi Tim,

        Thanks for you feedback.
        Yes, snmptrapd writes to file, ps ax | grep snmp shows snmptrapper and snmptrapd.
        But as I wrote, i installed a fresh version of the Zabbix appliance and managed to get the perl script to work as apposed to the bash script and I got the trapping to work.

        The only issue now it to replicate the success to my production server

        Reidar

        Comment

        Working...