Ad Widget

Collapse

How can I configure Zabbix Proxy on distributed monitoring + modules doubts

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • alz0
    Junior Member
    • Feb 2023
    • 21

    #1

    How can I configure Zabbix Proxy on distributed monitoring + modules doubts

    Hi!

    I am planning how to set up a Zabbix monitoring system using a distributed system. My system will be composed by 2 Zabbix servers (one active and the other passive) with the web service, 2 database servers (in a Galera cluster) and 2 zabbix proxy servers to collect the data from the hosts. In addition with a third party tool, 2 farms will be created (one frontend and one for the backend) to achieve HA.

    Following the official docu, you have to install zabbi-proxy-sqlite3 on the Proxy server. Then you have to change the /etc/zabbix/zabbix_proxy.conf directory and specify the database. I don't understand this. According to what I have read on several sites, the database must be your own only. What do I have to modify? I was thinking of modifying the "Server" parameter and there specify the VIP of the frontend farm, this makes more sense to me.

    Is that correct? Something to add to this configuration, thanks!

    Module-doubts:
    By the way it is not clear to me, where to install the zabbix-sql-scripts module? Is it necessary for my configuration? And the module for zabbix-server is not zabbix-server anymore? I have to install zabbix-server-mysql on the main server and on the database server?


    Thanks!!!​
  • cyber
    Senior Member
    Zabbix Certified SpecialistZabbix Certified Professional
    • Dec 2006
    • 4807

    #2

    sqlite3 DB is a file... so you have to say in config, where are you going to create that file (DBName=/path/to/file).. With enough memory, you can also use /dev/shm for this..
    And then you specify server(s), who control that proxy, in Server parameter. Zabbix own HA solution expects you to write both server hosts there and not use VIP address. If you use some other methods to switch between active and passive, then usage of VIP is possible...
    Server yes If ProxyMode is set to active mode:
    Zabbix server IP address or DNS name (addressort) or cluster (addressort;address2ort) to get configuration data from and send data to.
    If port is not specified, the default port is used.
    Cluster nodes must be separated by a semicolon.

    If ProxyMode is set to passive mode:
    List of comma delimited IP addresses, optionally in CIDR notation, or DNS names of Zabbix server. Incoming connections will be accepted only from the addresses listed here. If IPv6 support is enabled then '127.0.0.1', '::127.0.0.1', '::ffff:127.0.0.1' are treated equally.
    '::/0' will allow any IPv4 or IPv6 address. '0.0.0.0/0' can be used to allow any IPv4 address.
    Example: Server=127.0.0.1,192.168.1.0/24,::1,2001:db8::/32,zabbix.example.com
    ​sql-scripts contains different things for DB schema config etc... You mey need this on your DB host(s)

    server package depends on the DB you are going to use... zabbpx-server-mysql or zabix-server-postgre.. In your case its "mysql".and you only need it on your "server" hosts...

    Comment

    • alz0
      Junior Member
      • Feb 2023
      • 21

      #3
      BIG THANKS cyber !

      In the end I have almost decided that I am going to use mysql/mariadb also for the proxy servers, since I am going to monitor quite a lot of resources.

      But what happens if a proxy server goes down? Do the other proxies pick up their tasks? Do I have to define this in some way or does it do it automatically?

      To solve the VIP and HA issues I have come up with the following. Put in "Server Parameter" the hosts or nodes of the cluster. And then simply use my VIP to access via web, although the web server will be in the same as the zabbix server. I think that might work.
      For the backend farm the same, a VIP with port 3306 so that Zabbix thinks it is just a DB and then inside a galley cluster. So the 2 servers will point to that VIP.

      Is there any problem if the 2 DBs of the cluster are in active mode?

      Thanks also for clarifiying my doubts about the packages
      Last edited by alz0; 22-02-2023, 16:48.

      Comment

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

        #4
        Originally posted by alz0
        In the end I have almost decided that I am going to use mysql/mariadb also for the proxy servers, since I am going to monitor quite a lot of resources.
        ​I have no done this, I would go there only in case of real big need.. But you can try it, it is after all supported solution.. And again, you don't have to have that DB locally, but in somekind of cluster/ farm outside...
        Originally posted by alz0
        But what happens if a proxy server goes down? Do the other proxies pick up their tasks? Do I have to define this in some way or does it do it automatically?
        no... proxies for now have no HA solution, this is something what you need to build by yourself... Here, for example, I have 8 node corosync/pacemaker cluster to run 6 proxies ... pacemaker will switch resources (VIP and proxy processes) to other host, if something happens with one..
        Originally posted by alz0
        To solve the VIP and HA issues I have come up with the following. Put in "Server Parameter" the hosts or nodes of the cluster. And then simply use my VIP to access via web, although the web server will be in the same as the zabbix server. I think that might work.
        For a proxy thats what you need to do .. point out both server hosts and let it decide by itself where and how... But you need to resolve the VIP switchover issue also, when Zabbix decides to switch nodes...
        Originally posted by alz0
        For the backend farm the same, a VIP with port 3306 so that Zabbix thinks it is just a DB and then inside a galley cluster. So the 2 servers will point to that VIP.
        yes this is absolutely normal...

        Originally posted by alz0
        Is there any problem if the 2 DBs of the cluster are in active mode?
        I dont think Zabbix will notice how your DB cluster is built up and what goes n there.

        Comment

        • alz0
          Junior Member
          • Feb 2023
          • 21

          #5
          Originally posted by cyber
          ​I have no done this, I would go there only in case of real big need.. But you can try it, it is after all supported solution.. And again, you don't have to have that DB locally, but in somekind of cluster/ farm outside...
          no... proxies for now have no HA solution, this is something what you need to build by yourself...
          I dont have a really big necessity, I'm only considering having proxies because maybe only one active Zabbix-Server can't manage monitoring 3500 hosts and 12000 services.... And if I use proxies, I see the need to have HA, otherwise, what would happen in case one goes down? I find it unbelievable that these tasks cannot be delegated...
          Originally posted by cyber
          Here, for example, I have 8 node corosync/pacemaker cluster to run 6 proxies ... pacemaker will switch resources (VIP and proxy processes) to other host, if something happens with one...
          For a proxy thats what you need to do .. point out both server hosts and let it decide by itself where and how... But you need to resolve the VIP switchover issue also, when Zabbix decides to switch nodes...
          What about if I do the same as with the DB. A Netscaler farm load-balancing the proxies farm, so for the 2 zabbix servers there is only going to be one "proxy", the VIP of that farm, and then with netscaler round-robin the load, should this work? And then the proxies in Active mode, send the data to the zabbix server, well, the frontend VIP. With Netscaler I can do a Active-Passive cluster to resolve the switchover issue.

          Originally posted by cyber
          I dont think Zabbix will notice how your DB cluster is built up and what goes n there.
          Nice


          Sorry for being such a pain, I'm not at all clear on what would be the best solution for my requirements.
          Thank goodness there are people like you to clarify doubts based on your experience.
          Last edited by alz0; 23-02-2023, 09:38.

          Comment

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

            #6
            HA for proxies... you should make sure, that you have one instance of a proxy up and running at any time. Otherwise it is not possible to distribute config to them. So that rules out "loadbalancing" in front of them... those instances will never get same config and also will not gather same data.. One of them should be running and other stand by... Standby wakes up as clean slate, asks for required config from server and start monitoring needed hosts. At same time the other one goes from active to standby (processes stopped, db cleaned up). and you VIP address is also moved from one to other..

            If you want to build HA solution with your own tools, you can do it (like everyone did before native HA came out with v6). Not using native HA means pretty much the same as with proxy HA... you have to make sure you have one instance running. Your HA software/solution makes the decisions to wake up other one and shut down first one and manage where the VIP points.. There should always be only one to rule them all..

            Comment

            • alz0
              Junior Member
              • Feb 2023
              • 21

              #7
              Hi cyber,

              The question is that there is no native HA solution for proxies... right?

              That's why I have to use third party software. My solution would only balance the incoming load through the VIP to all active proxies. I would not need to alert from one to another what state they are in.... Anyway, if needed, I would do it via Zabbix Trigers (I think it is possible).

              Another option is to do the HA of proxies with corosync/pacemaker but I am not convinced by those tools, besides I would need more third party servers or another one for a HAProxy right?

              I have a big mess with this, in the end if this does not work, I will give more capacity to the 2 Zabbix server and try to monitor everything with them.

              Comment

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

                #8
                yes. tehre is no native HA for proxies yet... FOr now it is in roadmap for version 7 https://www.zabbix.com/roadmap#v7_0_LTS
                And you cannot balance any load there... all your proxies are single instances, your hosts only know about one, only one proxy knows about any given host... So if your host is assigned to a proxyN, then data from that agent has to reach to proxyN, not balanced to some other host...

                You don't need haproxy with pacemaker/corosync... You can define VIP-s as resources and move them around together with proxy processes resource... colocation etc.. I have not done any other HA solutions, so I really cannot chip in here, about, what others can or cannot do..

                Comment

                • alz0
                  Junior Member
                  • Feb 2023
                  • 21

                  #9
                  What good news that version 7 addresses this problem

                  Well, maybe then the best thing to do is to pull with Pacemaker/Corosync if.... I will start with Zabbix Server and if I need more servers for the workload, I will scale the system to the Pacemaker/Corosync solution,

                  Do you know any tutorial to know more about this?
                  thanks for the help! cyber

                  Comment

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

                    #10
                    Not really... Our setup was built by a guy who knew things, I learned besides him.. I think there might be an article in zabbix blog somewhere ...

                    found one from Zabbix conference... https://assets.zabbix.com/files/even...ter_setups.pdf

                    Comment

                    • alz0
                      Junior Member
                      • Feb 2023
                      • 21

                      #11
                      Oh ,you had this work done then
                      Thanks for all again!!

                      Comment

                      Working...