Ad Widget

Collapse

Zabbix cluster using Pcs & Crosynce

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • batchenr
    Senior Member
    • Sep 2016
    • 440

    #1

    Zabbix cluster using Pcs & Crosynce

    Hello,

    i just made some tets on Pcs & Crosynce cluster on zabbix server
    and it all worked fine, then i did the same on the prod server (ofcurse i backed up)

    and then i started to get errors.
    now, i have 2 zabbix servers 3.2.6 Centos 7 + mariadb
    and 1 remote centos 7 maria db

    all works fine with 1 server and remote db.
    when i did the cluster install it pass but i got errors and it didnt worked correctly.

    1. first of all i made a virtual ip and it works fine, but i saw in the zabbix_agent log that the virtual ip is not the one trying to connect to the agent, but the internal node1 node2 servers - why ?

    i want to manage it from 1 ip.

    2. when i did a test and rebooted node1 - zabbix server on node 2 got DB error

    "query failed: [1062] Duplicate entry '2059346' for key 'PRIMARY' [insert into events (eventid,source,object,objectid,clock,ns,value) values"

    how can i overcome duplicates ?

    other then that it works fine
  • Akansha123
    Member
    • Jun 2016
    • 54

    #2
    As you said you are getting node1 and node2 IP instead of virtualIP. In this case you have to change "Server" and "Server_Active" parameter with <cluster_IP> or <virtual_IP> in zabbix_agentd.conf file

    Through corosync & pacemaker what type of high availability you are trying to achieve? As below three possibilities exist
    1) HA of zabbix server
    2) HA of database
    3) HA of GUI

    Are you using "HA of database" with shared database on 3rd node? Then you wont' be requiring separate databases on node 1 and node 2.

    You are using which type of configuration Active-Active HA or Active-Passive HA?

    Comment

    • batchenr
      Senior Member
      • Sep 2016
      • 440

      #3
      Originally posted by Akansha123
      As you said you are getting node1 and node2 IP instead of virtualIP. In this case you have to change "Server" and "Server_Active" parameter with <cluster_IP> or <virtual_IP> in zabbix_agentd.conf file

      Through corosync & pacemaker what type of high availability you are trying to achieve? As below three possibilities exist
      1) HA of zabbix server
      2) HA of database
      3) HA of GUI

      Are you using "HA of database" with shared database on 3rd node? Then you wont' be requiring separate databases on node 1 and node 2.

      You are using which type of configuration Active-Active HA or Active-Passive HA?
      Hi,
      thanks for the replay.

      when i changed the Server & Server active at the agent conf i could see
      at agent.log that it saying premmition denaind to node1&node2
      and only virtual IP allowd - but the virtual ip is not the one who is making the connection.

      maybe it is related to zabbix.conf settings :
      SourceIP
      ListenIP

      ?

      and for now i want a- passiv active cluster if im correct
      i want 2 zabbix servers machine that only one is active and when the main machine is powerd off \ zabbix crashes the other machine takes over.

      and i have for now one remote db server and it the futuer i would like to connect it to a cluster also - passiv active.

      now is i do a cluster status this is what is shows :

      Code:
      [root@Cluster-Tester-01 ~]# pcs status
      Cluster name: zabbixserver
      WARNING: corosync and pacemaker node names do not match (IPs used in setup?)
      Stack: corosync
      Current DC: Cluster-tester-02 (version 1.1.15-11.el7_3.4-e174ec8) - partition with quorum
      Last updated: Sun Jun 18 10:16:42 2017		Last change: Wed Jun 14 14:59:20 2017 by root via cibadmin on Cluster-Tester-01
      
      2 nodes and 3 resources configured
      
      Online: [ Cluster-Tester-01 Cluster-tester-02 ]
      
      Full list of resources:
      
       virtual_ip	(ocf::heartbeat:IPaddr2):	Started Cluster-tester-02
       cluster_vip	(ocf::heartbeat:IPaddr2):	Started Cluster-Tester-01
       zabbix_server	(systemd:zabbix-server):	Started Cluster-Tester-01
      
      Daemon Status:
        corosync: active/enabled
        pacemaker: active/enabled
        pcsd: active/enabled
      and also i need to know what i can do when the node 2 takes over node 1
      i get the DB duplicates.

      Thanks.

      Comment

      Working...