Ad Widget

Collapse

Zabbix 4.4.3 Dashboard - how to expand page to accept more widgets (rows)

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ran22man
    Junior Member
    • Apr 2009
    • 7

    #1

    Zabbix 4.4.3 Dashboard - how to expand page to accept more widgets (rows)

    I have been using Zabbix since 2009, but haven't had the need for this - until now. I want to have a comparison Dashboard page of 20 graphs of one switch versus 20 graphs of another similar switch (port comparison - 20 rows per column). Seems to have a limit of 12 graph "rows" before I can't add anymore in that column. I went to /usr/share/zabbix/include/defines.inc.php and edited line 785 "define('DASHBOARD_MAX_ROWS', 64);" and changed this to 128. While this allowed me to put the full 20 rows and 2 columns, when I went to "Save Changes" I got this error at the top of the page: "Invalid parameter "/1/widgets/27/y": value must be one of 0-62." Ultimately I can't save changes with this error.
    What else do I need to edit to allow the full effect of adding 20 graph rows in 2 columns to occur without throwing errors? Is it a another change in a PHP page or is this a Javascript issue. I don't see it as a javascript issue, but if I'm wrong I'll be the first to admit it.

    Zabbix edition: 4.4.3, 1 server, 2 active proxies, monitoring 65+ buildings and over 1200 hosts
    Ubuntu 18.04, installed via apt packages on server, 16G RAM

    - Randy Laframboise
    Network and Systems Specialist
    University of Windsor
    Last edited by ran22man; 05-12-2019, 00:41.
  • Evgeniy
    Senior Member
    • May 2012
    • 157

    #2
    Try zabbix4/include/classes/api/services/CDashboard.php
    const MAX_Y = 63; // DASHBOARD_MAX_ROWS - 1

    Comment

    • ran22man
      Junior Member
      • Apr 2009
      • 7

      #3
      Thank You! I will give that a try, and let you know how that goes.

      Comment

      • ran22man
        Junior Member
        • Apr 2009
        • 7

        #4
        In total I made 2 changes that worked: working off of your original suggestion, I changed in /usr/share/zabbix/include/classes/api/services/CDashboard.php to this value:
        const MAX_Y = 126; // DASHBOARD_MAX_ROWS - 2; [Changed from 62 (64-2) to 126 (128-2)]
        This was to coincide with the earlier change in /usr/share/zabbix/include/defines.inc.php:
        785 define('DASHBOARD_MAX_ROWS', 128); [Changed from 64 earlier]

        That seemed to do the trick...so now I can put 40 graphs at a time (20 rows, 2 columns) for my Dashboard display. Thanks again for the assistance.

        Comment

        • orbital
          Senior Member
          • Dec 2019
          • 104

          #5
          Originally posted by ran22man
          const MAX_Y = 126; // DASHBOARD_MAX_ROWS - 2; [Changed from 62 (64-2) to 126 (128-2)]
          Hello, in version 5.2 there is no such item

          Comment


          • Atsushi
            Atsushi commented
            Editing a comment
            Isn't the setting in the following file?
            /usr/share/zabbix/include/classes/api/services/CDashboardGeneral.php
        • dimir
          Zabbix developer
          • Apr 2011
          • 1080

          #6
          Since 5.2.0beta2 it's in CDashboardGeneral.php
          Code:
          [B]$[/B] git show 2b8e6aa3f3d ui/include/classes/api/services/CDashboardGeneral.php | grep MAX_Y
          + protected const [B]MAX_Y[/B] = 62; // DASHBOARD_MAX_ROWS - 2;

          Comment


          • ran22man
            ran22man commented
            Editing a comment
            Yes, they keep "moving the goalposts" to accomodate other features. I've had to change this several times myself from the original post, which was for 4.4.3. But in general finding those entries is what you need. I also had to increase font size in the maps, which is not as straightforward as one would think.
        • orbital
          Senior Member
          • Dec 2019
          • 104

          #7
          Hello. Updated to 5.4.3 and again I can't find where this parameter is

          Comment

          • dimir
            Zabbix developer
            • Apr 2011
            • 1080

            #8
            Now it's
            Code:
            ui/include/defines.inc.php:define('DASHBOARD_MAX_ROWS', 64);
            If you are using packages, it should be
            Code:
            /usr/share/zabbix/include/defines.inc.php

            Comment

            • phci
              Junior Member
              • Nov 2021
              • 1

              #9
              Hi, I'm currently running on 5.0.17 and can't really find the "const MAX_Y" value, it doesn't seem to match 4.4 or 5.2, where would I find it?

              Comment

              • Atsushi
                Senior Member
                • Aug 2013
                • 2028

                #10
                Zabbix 5.0 is the same as Zabbix 4.4. If you are installing using the official package, you will need to modify the following two files.

                /usr/share/zabbix/include/defines.inc.php
                /usr/share/zabbix/include/classes/api/services/CDashboard.php

                Comment

                Working...