Ad Widget

Collapse

Proxies to reduce load?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Noobz
    Senior Member
    • Jun 2020
    • 105

    #1

    Proxies to reduce load?

    We're rolling out Zabbix to replace multiple monitoring systems and want to make sure the architecture, and our ideas of how it operates are correct.

    We have several thousand hosts ~7k, most have around 150-300 items, some have 1-2k items.

    We do not need proxies to reach our monitored hosts, however I am wondering if using them would take IO, bandwidth, and/or storage load off of the primary server? I believe not.

    We are looking to partition the database using this script/instructions: "https://bestmonitoringtools.com/zabbix-partitioning-tables-on-mysql-database/"

    Is there a more flexible way of doing this than using the script which appears to set global values for retention/trend duration? This isn't a show stopping thing but it would be great if we could allow specific items or even hosts to have longer retention periods.
  • isaqueprofeta
    Senior Member
    Zabbix Certified SpecialistZabbix Certified Professional
    • Aug 2020
    • 154

    #2
    Proxies helps a lot in any environment. Takes of the server the need to collect data and since 5.0 preprocessing of items.

    I really prefer to use the postgres database. Currently with timescaledb is even better for managing the Housekeeper work.

    Comment

    • LenR
      Senior Member
      • Sep 2009
      • 1005

      #3
      Agent (active) items might be better than regular Agent items in this case.

      I think partitioning normally forces the same retention for all hosts. It's really "cheaper" to keep the data longer than to let housekeeper delete it.

      Comment

      • HellLordKB
        Junior Member
        • Feb 2015
        • 10

        #4
        Your scale while big, is not the largest i've read about. You'll benefit more from timescaledb far, far more than you would from the mysql/mariadb/innodb tables with partitioning. DB partitioning with standard mysql is like retroactively making it better, or putting a patch to cover a gap in mysqls original design for relational database records.. Timescaledb however was more designed from the beginning for managing the data lifecycle and scale better. Take a look here https://blog.timescale.com/blog/time...-6a696248104e/. its easiest to think of timescaldb like its a separate data storage engine or table type in postgres. only the zabbix history tables are kept in timescaledb hypertables. all the rest of the zabbix database tables are still kept in native/normal postgres.

        The next biggest advantage would be active agents. Active agents are sometimes misunderstood. I"ve been doing monitoring for over a decade and push always scales better than pull. In the past the concern with push was you need a heartbeat check method which makes sure the things pushing to the db are still pushing. The zabbix active agent templates have that. The other sometimes misconception is that active agents mean you have to manage their config, you do not. The active agent daemon conf file you configure with a "get the latest config from zabbix every N hours" and that keeps the bulk of the monitoring config of your agents up to date with whats in the server. I keep this value pretty low, like 20 minutes. That way when i make a template change on the server, it doesn't take more than 20 minutes for the agent to give me the new metrics.

        Proxies help a number of ways but switching to push from agents instead of pull will help far more. In 5.0, architectural differences in zabbix mean the proxies do much, much more than they use to. Alot of I/O and cpu time is spent in processing and preprocessing metrics, especially if your doing any prometheus or other text to numerical conversion. in 5.0 zabbix proxies do alot of the processing and preprocessing.


        A couple other advice things to consider.
        1. You will still have graphs and grafana from your items monitored from trend tables. You do not need to keep history data for graphing of stuff. Trends take 1 hour average, min and max values for your items and store it differntly than the history data. Tune your housekeeper settings for history and trend to reflect that.
        2. Consider using the max values to override template values.
        3. One of the valuable things zabbix added in in 4.2, which i dont think alot of people use is discarding unchanged values with a heartbeat. IT can be a surprising disk saver. https://blog.zabbix.com/why-zabbix-t...d-with-a-heart

        Comment

        • kloczek
          Senior Member
          • Jun 2006
          • 1771

          #5
          Originally posted by isaqueprofeta
          Proxies helps a lot in any environment. Takes of the server the need to collect data and since 5.0 preprocessing of items.

          I really prefer to use the postgres database. Currently with timescaledb is even better for managing the Housekeeper work.
          It really doesn't matter what kind of DB backend is used.
          More important is using partitioned tables and enough RAM to be able cache data in memory.
          http://uk.linkedin.com/pub/tomasz-k%...zko/6/940/430/
          https://kloczek.wordpress.com/
          zapish - Zabbix API SHell binding https://github.com/kloczek/zapish
          My zabbix templates https://github.com/kloczek/zabbix-templates

          Comment

          • kloczek
            Senior Member
            • Jun 2006
            • 1771

            #6
            Originally posted by HellLordKB
            The next biggest advantage would be active agents. Active agents are sometimes misunderstood. I"ve been doing monitoring for over a decade and push always scales better than pull. In the past the concern with push was you need a heartbeat check method which makes sure the things pushing to the db are still pushing. The zabbix active agent templates have that. The other sometimes misconception is that active agents mean you have to manage their config, you do not. The active agent daemon conf file you configure with a "get the latest config from zabbix every N hours" and that keeps the bulk of the monitoring config of your agents up to date with whats in the server. I keep this value pretty low, like 20 minutes. That way when i make a template change on the server, it doesn't take more than 20 minutes for the agent to give me the new metrics.
            So just decrease config updates intervals. This is not a rocket science.

            A couple other advice things to consider.[LIST=1][*]You will still have graphs and grafana from your items monitored from trend tables. You do not need to keep history data for graphing of stuff. Trends take 1 hour average, min and max values for your items and store it differntly than the history data. Tune your housekeeper settings for history and trend to reflect that.
            Why you are using grafana instead adding that graphs which you need straight in zabbix templates?

            http://uk.linkedin.com/pub/tomasz-k%...zko/6/940/430/
            https://kloczek.wordpress.com/
            zapish - Zabbix API SHell binding https://github.com/kloczek/zapish
            My zabbix templates https://github.com/kloczek/zabbix-templates

            Comment

            Working...