Welcome to Pandora FMS Community!

Find answers, ask questions, and connect with our community around the world.

  • SNMP Console Not showing traps

    Posted by Steve on February 26, 2023 at 08:22

    Hi,

    I’m trying to get SNMP traps to show in the SNMP Console. The SNMP console starts and just shows no traps. In my /var/log/pandora/pandora_snmptrap.log i do see the traps

    Initially i had an ICMP Destination unreachable shown in wireshark, following the advice on the forum i modified pandora_server.conf , and rebooted.

    Now i see traps in pandora_snmptrap.log without any delay but nothing in the console.

    SNMPv1[**]2023-02-24[**]10:02:49[**]192.168.201.239[**].1.3.6.1.2.1.1.1.0[**]3[**]Link Up[**]0[**].1.3.6.1.2.1.1.1.0 = STRING: Steve Trap .1.3.6.1.2.1.1.2.0 = OID: .1.3.6.1.9.1.1.0 .1.3.6.1.2.1.1.3.0 = Timeticks: (2324) 0:00:23.24 .1.3.6.1.2.1.1.4.0 = STRING: StIves

    The permissions on the log file were root:apache , which from looking at the log rotation file i modified to pandora:apahe but this made no difference. I’ve incresed log verbosity and i can see the trap being received literally within milliseconds, there are no errors that i can see:

    2023-02-25 16:09:27 ProducerConsumerServer: centsnmp [V10] Reading trap ‘2023-02-25[**]16:09:21[**]192.168.201.198[**].1.3.6.1.2.1.1.1.0[**]3[**]Link Up[**]0[**].1.3.6.1.2.1.1.1.0 = STRING: Steve Trap .1.3.6.1.2.1.1.2.0 = OID: .1.3.6.1.9.1.1.0 .1.3.6.1.2.1.1.3.0 = Timeticks: (2324) 0:00:23.24 .1.3.6.1.2.1.1.4.0 = STRING: StIves’

    If i wait an hour or two, the traps will be displayed in the console

    Any help would be greatly appreciated.

    BR

    Steve

    Sergio replied 1 year, 8 months ago 2 Members · 3 Replies
  • 3 Replies
  • Sergio

    Administrator
    February 27, 2023 at 09:25
    1270 Karma points
    Community rank: tentacle_master_icon Tentacle Master
    Like it
    Up
    0
    Down
    Drop it
    ::

    Hello,

    Is there any delay displayed in the Servers View in the Console within the SNMPTrap server?

    You can attach here an screenshot of the Servers View in order for us to check the threads and queued modules you have atm.

    Those traps you are receiving are comming automatically or are being generated by you?

    In case they come automatically from remote devices can you try to execute this command in the PandoraFMS shell and see if they report right away?

    Make sure to change the SNMP version to the one you want to use, the community and the IP:

    for i in {1..5}; do snmptrap -v 2c -c public 127.0.0.1 '' .1.3.6.1.2; done

    This should create 5 traps in the SNMP console.

    Thanks in advance.

    Kind regards,

    Sergio B.

  • Steve

    Member
    February 27, 2023 at 09:59
    29 Karma points
    Community rank: tentacle-noob-1 Tentacle noob
    Like it
    Up
    0
    Down
    Drop it
    ::

    Hi Sergio,

    Thanks for your help on this, screenshots attached. The server works absoultely fine when i pass xml. I have tried traps from Avara devices, i thought these may cause an issue as they were not received correctly by NET-SNMP on windows, buffer was not large enough for all the varbinds. So i tried generating my own trap. I initially thought neither worked. Then when i came back the following day i had both traps in the console. I can use pandora for SNMP get on the avara devices without any issues. Also i disabled authorisation in the conf file so i could rule out communities etc.

    I have a demo for Scottish Power Energy Networks in approx 1hr. I am using XML to get the information into Pandora for this, but it would be nice to use SNMP Traps

    Thanks

    Steve

  • Sergio

    Administrator
    February 27, 2023 at 15:35
    1270 Karma points
    Community rank: tentacle_master_icon Tentacle Master
    Like it
    Up
    0
    Down
    Drop it
    ::

    Hello Steve,

    Having this issue is pretty rare that you have this delay when receving the traps.Everything looks normal from the Server’s view and if there is no resources problem from server side and the SNMP traps are being read from the log, then it should be working normal.

    What we can try is to stop the PandoraFMS server with /etc/init.d/pandora_server stop, then execute the ps aux | grep snmptrap command in the Server shell, kill by its PID any snmptrap processes running with kill -9 <PID> and finally start the PandoraFMS server again.

    If this doesn’t resolve this issue you can check the pandora_server.conf file and see if you have the snmpconsole_lock parameter set to 1, in case you do, change it to 0.Also you can play with this two parameters and see if you see any changes:

    snmp_storm_protection 50
    snmp_storm_timeout 10

    The first parameter will stop the traps from getting logged in the Console when the same device sends more than 50.

    The second will add a timeout to those traps from spamming the Console.

    Kind regards,

    Sergio B.