Ad Widget

Collapse

Zabbix template not updating with hosts more than 1000

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Tejesh kalyan
    Junior Member
    • Nov 2018
    • 5

    #1

    Zabbix template not updating with hosts more than 1000

    Hi All,

    I have a template with hosts more than 1000. When I am trying to update an item or a trigger, the zabbix page is displaying a blank page with header.

    https://support.zabbix.com/browse/ZBX-12044 referring to this thread, a template can have only 951 hosts. Could someone please help me in resolving the issue.

    Thanks in advance.
  • ingus.vilnis
    Senior Member
    Zabbix Certified Trainer
    Zabbix Certified SpecialistZabbix Certified Professional
    • Mar 2014
    • 908

    #2
    Did you try to go though the troubleshooting steps mentioned in the linked issue?

    Comment

    • Tejesh kalyan
      Junior Member
      • Nov 2018
      • 5

      #3
      Hi Ingus,

      Thank you for the reply.

      I have update the max_input_vars in php.ini file to 30000 but it didn't work.

      Thanks

      Comment

      • ingus.vilnis
        Senior Member
        Zabbix Certified Trainer
        Zabbix Certified SpecialistZabbix Certified Professional
        • Mar 2014
        • 908

        #4
        Restarted apache/httpd or whatever web server you have after the change?

        Do you see anything in the web server's error logs?

        Comment

        • Tejesh kalyan
          Junior Member
          • Nov 2018
          • 5

          #5
          PHP Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 77 bytes) in /var/www/html/zabbix/include/classes/api/CApiService.php on line 286,

          max_input_vars = 300000
          php_value max_input_vars 300000

          Do I need to reduce the value?

          Comment

          • ingus.vilnis
            Senior Member
            Zabbix Certified Trainer
            Zabbix Certified SpecialistZabbix Certified Professional
            • Mar 2014
            • 908

            #6
            So it is not the correct setting you are tuning first of all.

            Set max_input_vars = 10000 and leave it till you reach 10 thousand hosts in your setup.

            Would you kindly search for the error message you actually get in the logs and propose a solution for that?

            Comment

            • Tejesh kalyan
              Junior Member
              • Nov 2018
              • 5

              #7
              Thank you it worked. I have increased the memory limit to 512M.

              Comment

              • kloczek
                Senior Member
                • Jun 2006
                • 1771

                #8
                Because single mass host update/delete locks a lot of zabbix tables I would recommend to do such update in the loop for each host over API.
                With such approach is not necessary to increase any limits in php.ini and it will not cause stopping update triggers (because between each host update will be enough time to absorb and evaluate new incomming monitoring data against triggers definitions).
                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

                • Tejesh kalyan
                  Junior Member
                  • Nov 2018
                  • 5

                  #9
                  Agree with kloczek. Both ways worked. Thank you for helping me

                  Comment

                  Working...