Ad Widget

Collapse

Zabbix HA via postgres replication.

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • pietro54
    Senior Member
    • Feb 2011
    • 112

    #1

    Zabbix HA via postgres replication.

    Hello,
    I dont know if toppic describe whole idea, but I need to make some High Availability on my Zabbix server.

    I got 2 idenical machines, identical os configurations,
    Zabbix 2.0.4, postgres 9.1.6, RH 6.3
    I made replication between postgres databases
    Idea form: http://wiki.postgresql.org/wiki/Streaming_Replication
    Replication work ok. Wal`s are swimming from node1 to node2.

    I copy all /etc/sysconfig/network-scripts to node2(only change mac of cards)
    All Ifaces are now down, they waiting to start network service(when first node goes down).
    Only one thing is problem, when i come into http://localhost/zabbix via browser i got configuration screan i can`t go further, becouse my db is in RO mode, what shoul I do?
    Copy some .conf file from node1? What file? (couse /var/www/html/conf/zabbix.conf.php isent helping)


    When the problem with "configuration" will be solved I want to simulate pull over power cables from node1.
    What should i do next? Database fromn node2 will automaticli take master role?
    or shoul i something do else?

    Regards
    Piotr
  • f.koch
    Member
    Zabbix Certified Specialist
    • Feb 2010
    • 85

    #2
    Hi,

    you need to say postgresql to go into master mode


    regards fl0

    Comment

    • pietro54
      Senior Member
      • Feb 2011
      • 112

      #3
      Hello,
      Thanks for replay, pg_ctl promote works ok!

      1)But maybe You can tell me what value should be in string :trigger_file ??
      i don`t understated "Specifies a trigger file whose presence ends recovery in the standby. Even if this value is not set, you can still promote the standby using pg_ctl promote. This setting has no effect if standby_mode is off."

      I will be glad if this will work automatically.

      --Edit--
      2) When i promote standby - node2 and use it for a while, I want to back to node1,
      I started base on node1 but it starts with postgres: wal writer process
      not with sender, what should I do? unpromote node2 ?

      Node1
      /usr/pgsql-9.1/bin/pg_ctl promote
      pg_ctl: cannot promote server; server is not in standby mode
      -bash-4.1$ ps uax | grep wal
      postgres 11979 0.0 0.0 8791312 6672 ? Ss 13:37 0:00 postgres: wal writer process
      I did not change anything in postgres config. Maybe some one will know how to return sender process?



      3)One more curious thing,
      When I shut down database and start after one minute all of triggers "host is unreachable" send me false alarms.
      Is there possibility to escape from this problem? Im getting over 200mails
      Last edited by pietro54; 20-12-2012, 15:05.

      Comment

      • pietro54
        Senior Member
        • Feb 2011
        • 112

        #4
        Hello,
        Can anyone tell me how to promote first node to be a sender again?

        Regards
        Piotr

        Comment

        Working...