Ad Widget

Collapse

zabbix not receiving traps

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    zabbix not receiving traps

    Hi, I'm trying to configure Zabbix to receive traps. I see snmptrapd port receiving traps. but, not writing to /tmp/zabbix_traps.tmp

    I have followed the below procedure

    1. Installed net-snmp-utils net-snmp-perl net-snmp

    2. snmpd and snmptrapd service is running

    3. cp ./zabbix-4.4.6/misc/snmptrap/zabbix_trap_receiver.pl /usr/bin

    4. chmod +x /usr/bin/zabbix_trap_receiver.pl

    5. added below lines to snmptrapd.conf authCommunity execute public perl do "/usr/bin/zabbix_trap_receiver.pl";

    6. vi /etc/zabbix/zabbix_server.conf StartSNMPTrapper=1 SNMPTrapperFile=/tmp/zabbix_traps.tmp (same as zabbix_trap_receiver.pl)

    7. restarted Zabbix server and snmptrapd.

    when I send traps I can see it server receiving through tcpdump but not in zabbix_traps.tmp file

    --------------------------------------------------------
    [[email protected] tmp]# tcpdump -i eth0 port 162 tcpdump: verbose output suppressed, use -v or -vv for full protocol decode listening on eth0, link-type EN10MB (Ethernet), capture size 262144 bytes 00:10:31.780614 IP 192.168.1.174.49298 > ip-10-1-1-75.ec2.internal.snmptrap: Trap(47) S:1.1.5.4 0.0.0.0 enterpriseSpecific s=33 55 S:1.1.5.4="eth0" 00:10:32.274401 IP 192.168.1.174.50426 > ip-10-1-1-75.ec2.internal.snmptrap: Trap(47) S:1.1.5.4 0.0.0.0 enterpriseSpecific s=33 55 S:1.1.5.4="eth0" 00:10:32.689732 IP 192.168.1.174.55607 > ip-10-1-1-75.ec2.internal.snmptrap: Trap(47) S:1.1.5.4 0.0.0.0 enterpriseSpecific s=33 55 S:1.1.5.4="eth0" 00:10:33.203367 IP 192.168.1.174.43456 > ip-10-1-1-75.ec2.internal.snmptrap: Trap(47) S:1.1.5.4 0.0.0.0 enterpriseSpecific s=33 55 S:1.1.5.4="eth0"
    ----------------------------------------------------------

    [[email protected] zabbix-4.4.6]# [[email protected] zabbix-4.4.6]# cat /tmp/zabbix_traps.tmp [[email protected] zabbix-4.4.6]# [[email protected] zabbix-4.4.6]#
    -- Thanks
    Vikas Gurlinka

    #2
    First, check whether you have snmptrapd running and look in its logs. If necessary, increase the debugging level for snmptrapd.

    Comment


    • gurlinks
      gurlinks commented
      Editing a comment
      snmptrapd is running. but I see the below error message

      Mar 25 17:30:30 ip-10-1-1-75.ec2.internal snmptrapd[18970]: embedded perl support failed to initialize (perl_parse(/usr/share/snm...ed 2)

      [[email protected] perl]# service snmptrapd status
      Redirecting to /bin/systemctl status snmptrapd.service
      ● snmptrapd.service - Simple Network Management Protocol (SNMP) Trap Daemon.
      Loaded: loaded (/usr/lib/systemd/system/snmptrapd.service; enabled; vendor preset: disabled)
      Active: active (running) since Wed 2020-03-25 17:30:30 UTC; 2min 31s ago
      Main PID: 18970 (snmptrapd)
      CGroup: /system.slice/snmptrapd.service
      └─18970 /usr/sbin/snmptrapd -Lsd -f

      Mar 25 17:30:30 ip-10-1-1-75.ec2.internal systemd[1]: Starting Simple Network Management Protocol (SNMP) Trap Daemon....
      Mar 25 17:30:30 ip-10-1-1-75.ec2.internal snmptrapd[18970]: Can't open perl script "/usr/share/snmp/snmp_perl_trapd.pl": No such ...ctory
      Mar 25 17:30:30 ip-10-1-1-75.ec2.internal snmptrapd[18970]: embedded perl support failed to initialize (perl_parse(/usr/share/snm...ed 2)
      Mar 25 17:30:30 ip-10-1-1-75.ec2.internal snmptrapd[18970]: NET-SNMP version 5.7.2
      Mar 25 17:30:30 ip-10-1-1-75.ec2.internal systemd[1]: Started Simple Network Management Protocol (SNMP) Trap Daemon..
      Hint: Some lines were ellipsized, use -l to show in full.

    #3
    0) Take a look at https://support.zabbix.com/browse/ZBX-17192
    1) install libsnmp-perl
    2) check output of “snmptrapd -On”
    Last edited by Hamardaban; 26-03-2020, 20:40.

    Comment

    Announcement

    Collapse
    No announcement yet.
    Working...
    X