Ad Widget

Collapse

Zabbix ha cluster database question

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • avoc
    Junior Member
    • Sep 2025
    • 2

    #1

    Zabbix ha cluster database question

    Hi everyone,

    I’m currently working on setting up a Zabbix HA cluster between 2 geo distant sites and wondering the "best/good" solution for the databases...

    My goal is to have 1 zabbix server per site in a ha cluster and 1 db server per site ...

    Which database engines or setups have you found to be the most reliable for this scenario (MySQL, MariaDB, PostgreSQL, Oracle ) ? I tried to find recommendations within the Zabbix documentation but didn't find much or maybe I'm blind ?

    Any feedback or experience would be greatly appreciated.

    Thanks!
  • NgRox
    Member
    • Jun 2022
    • 44

    #2
    Hi,

    I've built many environments with database HA... from version 4 to 7.

    For the databases, I used MySQL with master/master replication.

    The connection between the Zabbix Server nodes and the database is managed by a Haproxy (a service that manages connections). It always manages connections for one database, and if that database goes down, it redirects to the other.

    It's also possible to use Postgres, however, replication is a bit more complicated. Both would use Haproxy to manage connections.

    I'm available if you have any further questions.

    Best regards

    Dennis - Zabbix Certified Professional, + 5 years of experiencie

    Comment

    • cyber
      Senior Member
      Zabbix Certified SpecialistZabbix Certified Professional
      • Dec 2006
      • 4806

      #3
      PG + pg_auto_failover and yes... Haproxy for connection management but it is not too complicated (check which side is "RW" and send data there).

      Comment

      • avoc
        Junior Member
        • Sep 2025
        • 2

        #4
        Thanks to you both for the feedback,

        The idea of a haproxy setup to manage the DB connections is something I will look into.

        regards,

        Comment

        • cyber
          Senior Member
          Zabbix Certified SpecialistZabbix Certified Professional
          • Dec 2006
          • 4806

          #5
          Originally posted by avoc
          Thanks to you both for the feedback,

          The idea of a haproxy setup to manage the DB connections is something I will look into.

          regards,
          The same can be done by some loadbalancer devices also. F5 BIG-IP load balancers for example... It works pretty much same way, you give them a short script to check RW vs RO state and then it just hammers those endpoints ...

          Comment

          Working...