Ad Widget

Collapse

bug: yaxismax on graph

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • djinn_fr22
    Member
    • Jan 2007
    • 54

    #1

    bug: yaxismax on graph

    Hi,

    I am trying to create a fixed Y axis graph template with network info.
    The problem is when I put a value greater than 10000 for y axis max value, it sends me an error message: Warning. Incorrect value for [yaxismax].

    But 10000 is only 10k, which is not a lot for network usage

    I find an old post discussing about that, but it doesn't seem that it has been corrected:


    Thanks
  • djinn_fr22
    Member
    • Jan 2007
    • 54

    #2
    [patch]: yaxismax

    In fact, the problem is a bit the same as related here:


    Because the value of yaxismax is stored as a DOUBLE(16,4), the maximum value possible is 65535.

    I change it as a DOUBLE(32,4) with the query:

    ALTER TABLE graphs MODIFY yaxismax DOUBLE(32,4) DEFAULT '0.0000' NOT NULL;

    There also a control of the value in the front-end, so edit graphs.php and modify it like that:
    "yaxismax"=> array(T_ZBX_DBL, O_OPT, NULL, BETWEEN(-4294967296,4294967296), 'isset({save})'),
    //"yaxismax"=> array(T_ZBX_DBL, O_OPT, NULL, BETWEEN(-65535,65535), 'isset({save})'),

    So now the maximum value possible is: 4294967296 =4G.
    Should be alright for Gigabit ethernet !

    Take care if you are upgrading to a newer version, especially if you are applying a patch on your database. The patch can override these changes.

    Comment

    • Lovespider
      Member
      • Sep 2004
      • 99

      #3
      Hello,
      I have to graph a 300Gb hard disk space...should I change 'yaxismax' to be DOUBLE(64,4) and change also graphs.php?
      Thanks!

      Comment

      Working...