Ad Widget

Collapse

Manage Snmp Trap in Zabbix native HA with virtual ip

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • AlexVe
    Junior Member
    • Apr 2024
    • 1

    #1

    Manage Snmp Trap in Zabbix native HA with virtual ip

    Let me start by saying that I am a newbie to zabbix. I would like to setup zabbix in native HA on two Ubuntu 22 LTS servers, in an active/passive configuration as per the documentation. My network has a significant number of SNMP devices sending traps to zabbix.
    From the documentation it appears that the net-snmp snmptrapd receiver must be configured to execute a zabbix script that formats the trap information in text form and writes it to a server directory. Now I could configure all the SNMP devices to send traps to two addresses of the two Ubuntu servers, and only the node with active Zabbix would process the traps in the form of text files, even if the other passive server would have the directory with the text files produced from snmptrapd. What happens if the passive server becomes active and finds the text files of the traps already processed in the directory? Will I have repeated and duplicated trap processing in the zabbix database??

    I could set a single virtual address on the two Ubuntu 22 LTS servers to receive traps from devices, instead of setting two addresses on each SNMP device on the network. To have this virtual IP to receive traps I could use keepalived or pcsd and I could also activate snmptrapd only on the node on which the virtual IP is active. In this configuration I would have the text files resulting from the trap processing in a directory of a single server, the one with the active virtual ip which may not coincide with the active Zabbix HA instance and therefore the traps would not be processed. How can this configuration be resolved?
  • cyber
    Senior Member
    Zabbix Certified SpecialistZabbix Certified Professional
    • Dec 2006
    • 4807

    #2
    Seems zabbix keeps trapfile size in db (https://git.zabbix.com/projects/ZBX/...Frelease%2F6.0 ). So yes, there might be duplicates after switchover... You can have aggressive logrotation there to reduce the amount of duplicates...
    But for all the snmp stuff having one single IP would be best. You can also set up a proxy for snmp hosts, it will take off a lot of load from your server ... as proxy has no native HA. you can use any of your known tools to make it HA..

    Comment

    Working...