Ad Widget

Collapse

Scheduled Housekeeping

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • modest
    Member
    • Dec 2009
    • 40

    #1

    Scheduled Housekeeping

    Is there any way to schedule Housekeeping process?

    I know that you can manage how often it's done (1-24), but I didn't find any option where to specify time when the housekeeping process starts.

    I would like housekeeping process to run at night time, but at this moment seems it's running at day, making high load on zabbix server.

    Will this option be included in next builds of zabbix or there is some kind of a workaround?
  • simonc
    Member
    • Jul 2009
    • 73

    #2
    I'm also interested by such feature !

    Maybe you could create a new ZBX request and vote for it ?

    Comment

    • modest
      Member
      • Dec 2009
      • 40

      #3
      ZBX request created and can be found here:

      Comment

      • Peteris
        Member
        • Feb 2010
        • 89

        #4
        I'm having a lot of issues because of housekeeping starts at day time - it's almost impossible to work with Zabbix at that time. It get's as slow as it can be.

        Database running on MySQL and size is about 14GB.

        Is there any scheduled time for this function to be invented? Is there any other suggestions except disabling housekeeping to get server working while the housekeeping process is in progress?

        Number of hosts (monitored/not monitored/templates) 140 78 / 4 / 58
        Number of items (monitored/disabled/not supported) 3221 2511 / 465 / 245

        I have no proxy. Should i get some? Would it solve the problem with performance?

        Please vote:

        Comment

        • alixen
          Senior Member
          • Apr 2006
          • 474

          #5
          Originally posted by Peteris
          Is there any other suggestions except disabling housekeeping to get server working while the housekeeping process is in progress?

          Number of hosts (monitored/not monitored/templates) 140 78 / 4 / 58
          Number of items (monitored/disabled/not supported) 3221 2511 / 465 / 245
          We have a smaller MySQL database (6 GB).
          Our current configuration is:
          Number of hosts (monitored/not monitored/templates) 272 112 / 10 / 150
          Number of items (monitored/disabled/not supported) 7012 5082 / 1930 / 0
          Number of triggers (enabled/disabled)[true/unknown/false] 2343 2294 / 49 [3 / 109 / 2182]
          Required server performance, new values per second 19.7395

          We have left default housekeeper configuration : it runs every hour.
          We haven't observed any slowdown.
          Maybe you can try running it more than once a day.

          Regards,
          Alixen
          http://www.alixen.fr/zabbix.html

          Comment

          • simonc
            Member
            • Jul 2009
            • 73

            #6
            Originally posted by Peteris
            I'm having a lot of issues because of housekeeping starts at day time - it's almost impossible to work with Zabbix at that time. It get's as slow as it can be.

            Database running on MySQL and size is about 14GB.

            Is there any scheduled time for this function to be invented? Is there any other suggestions except disabling housekeeping to get server working while the housekeeping process is in progress?

            Number of hosts (monitored/not monitored/templates) 140 78 / 4 / 58
            Number of items (monitored/disabled/not supported) 3221 2511 / 465 / 245

            I have no proxy. Should i get some? Would it solve the problem with performance?

            Please vote:
            https://support.zabbix.com/browse/ZBXNEXT-207
            Same problem here, we run housekeeping every hour and when it's running, the frontend slow down... it could be nice if we could run this housekeeping during the night !

            Comment

            • alixen
              Senior Member
              • Apr 2006
              • 474

              #7
              Obviously, our database is still small enough so that we don't have this problem yet.

              Scheduling the housekeeper during the night seems to be a good solution; unless it locks Zabbix server for a long time.

              Another solution I can imagine is to turn off Zabbix housekeeper and run a cron job that will delete all history data older than a month (or whatever max. history is setup) and all trends older than a year (or max. trend).
              Being an external script, it would be easier to tune and patch than current housekeeper that runs within zabbix_server process. Although I can code in C, I am quite reluctant to patch housekeeper code knowing that a bug there may result in memory leaks or crashes that will affect the whole zabbix_server process.

              Alixen
              http://www.alixen.fr/zabbix.html

              Comment

              • modest
                Member
                • Dec 2009
                • 40

                #8
                Originally posted by alixen
                Another solution I can imagine is to turn off Zabbix housekeeper and run a cron job that will delete all history data older than a month (or whatever max. history is setup) and all trends older than a year (or max. trend).
                Being an external script, it would be easier to tune and patch than current housekeeper that runs within zabbix_server process. Although I can code in C, I am quite reluctant to patch housekeeper code knowing that a bug there may result in memory leaks or crashes that will affect the whole zabbix_server process.
                That would be a solution to run external script, does someone have it? I'm not so good at scripting and SQL what so ever...

                Maybe you can try running it more than once a day.
                Have tried to run it once in 4h and once in 12h, it resulted in total stop of Zabbix - the server doesn't stop by it self - doesn't crash, but it stops collecting a data - queue bums up to max and doesn't clean until zabbix_server service is restarted. If it runs once in hour it slows down front page and is almost imposible to use as I mentioned before

                Comment

                • untergeek
                  Senior Member
                  Zabbix Certified Specialist
                  • Jun 2009
                  • 512

                  #9
                  What database back-end are you running?

                  Comment

                  • Peteris
                    Member
                    • Feb 2010
                    • 89

                    #10
                    Originally posted by untergeek
                    What database back-end are you running?
                    MySQL InnoDB on CentOS 5.4

                    Comment

                    • Peteris
                      Member
                      • Feb 2010
                      • 89

                      #11
                      Just to see the CPU load that housekeeping generates I took some screens:

                      With housekeeping working once every two hours - it even needs 2h to perform housekeeping...


                      I disabled it now and everything is fine - Zabbix is as fast as it was in beginning:


                      Of course there is just one problem - the DB is growing and not performing a housekeeping, so I would be glad if someone would share manual script which could perform housekeeping operation for MySQL.

                      Comment

                      • Peteris
                        Member
                        • Feb 2010
                        • 89

                        #12
                        Seems that a lot of problems with performance in my case was related to MySQL default settings.

                        So I used tool MySQL Tuner (http://blog.mysqltuner.com/) to point out some things which could be adjusted and now it seems that system is running housekeeping and at the same time there is no slow down on web page performance.

                        Of course I still would be glad to control time of housekeeping as the infrastracture grows.

                        Comment

                        • untergeek
                          Senior Member
                          Zabbix Certified Specialist
                          • Jun 2009
                          • 512

                          #13
                          Could you share a few of the before/after settings here?

                          Comment

                          • Peteris
                            Member
                            • Feb 2010
                            • 89

                            #14
                            guided by information provided from MySQLTuner and what I found on Google, I added these values:

                            Code:
                            skip-bdb
                            thread_cache_size=1300
                            tmp_table_size=64M
                            max_heap_table_size=64M
                            innodb_buffer_pool_size=16G
                            table_cache=1024
                            join_buffer_size=256M
                            query_cache_size=16M
                            query_cache_limit=256M
                            Before there was a default settings of MySQL.

                            Comment

                            • reallove
                              Junior Member
                              • Feb 2010
                              • 14

                              #15
                              Oh, hi !
                              Didn't know if I was the only one having this issues with zabbix housekeeper !
                              I have 3292 items monitored on 111 hosts. Keeping the default every hour housekeeping, is a mess. Zabbix is trashing the I/O in an unbelievable way.
                              Eliminating the RAM and CPU problems, the only problem remaining was I/O .
                              When the housekeeper is not running, everything works like a charm. But when it does, the load increases significantly, and the queue becomes huge => zabbix is unusable.
                              Having the feature to trigger housekeeper at a specific time of the day would be handy. I voted for that

                              Comment

                              Working...