Uploaded image for project: 'ZABBIX BUGS AND ISSUES'
  1. ZABBIX BUGS AND ISSUES
  2. ZBX-43

psql graphs > 25d 13h -- empty plot (possible fix here!)

XMLWordPrintable

    • Icon: Incident report Incident report
    • Resolution: Fixed
    • Icon: Major Major
    • 1.4.3
    • 1.4.3
    • Frontend (F)
    • None

      I changed one line of code in include/classes/graph.inc.php, where the SQL query is generated.

      At line #995 we have:
      Code:

      $calc_field = 'round('.$x.'(mod(clock+'.$z.','.$p.'))/('.$p.'),0)'; / required for 'group by' support of Oracle */

      ...which I changed to:
      Code:

      $calc_field = 'round('.$x.'::int8*(mod(clock+'.$z.','.$p.'))/('.$p.'),0)'; /* required for 'group by' support of Oracle */

      This works great in my setup and I can now get graphs for >25d 13h periods (one month for example!)...

      Now, this is obviously not a portable fix... Oracle, MySQL, SQLITE and others will probably not like the '::int8' I inserted.

      Questions:

      • How would one go about implementing a general fix ?
      • What is that 'i' column for, anyway ? (it looks like a complex SQL based way of generating a sequential index... could it be generated on the PHP side, eliminating this question at all ?)

      I'll keep an eye on feedback or reach me at ex #dot# vitorino #at# gmail #dot# com
      Cheers,

      http://www.zabbix.com/forum/showthread.php?t=7454

            Unassigned Unassigned
            alexei Alexei Vladishev
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: