Ad Widget

Collapse

Graph Bug

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • bobrivers
    Senior Member
    • Feb 2007
    • 115

    #1

    Graph Bug

    Hi,

    Zabbix 1.3.4 (mysql 4.1.12)

    When adding items to a graph, if I select a color with letters in its definition (for instance: the default green is 009900. The red color is FF0000) it throws an error: Warning. Field [color] is not integer

    Changing it to "simple" colors (only numbers) works fine.
  • NOB
    Senior Member
    Zabbix Certified Specialist
    • Mar 2007
    • 469

    #2
    Hi,

    it's the same here (1.3.4, PostgreSQL 8.1.3).
    The color is displayed fine in the selection "page"
    if colors like FF0000 are chosen.
    But the "Save" action does check for integers.
    If I use "0xFF0000" the integer check passes, but the color is unknown,
    later.

    Originally posted by bobrivers
    Zabbix 1.3.4 (mysql 4.1.12)

    When adding items to a graph, if I select a color with letters in its definition (for instance: the default green is 009900. The red color is FF0000) it throws an error: Warning. Field [color] is not integer

    Changing it to "simple" colors (only numbers) works fine.
    Another problem using PostgreSQL:

    An error message appears during the display of the completed graph:

    * pg_query() [function.pg-query]: Query failed: ERROR: for SELECT DISTINCT, ORDER BY expressions must appear in select list[/usr/local/www/data/zabbix/include/db.inc.php:275]
    * Error in query [ select distinct g.name from hosts h, items i, graphs_items gi, graphs g where h.status=0 and h.hostid=i.hostid and g.graphid=2 and i.itemid=gi.itemid and gi.graphid=g.graphid and h.hostid not in (-1) and (g.graphid / 100000000000000)=0 order by h.host] [ERROR: for SELECT DISTINCT, ORDER BY expressions must appear in select list]
    * pg_fetch_array() expects parameter 1 to be resource, boolean given[/usr/local/www/data/zabbix/include/db.inc.php:394]

    [added]
    I'll try to fix it an dhope that the second report is an error triggered
    by the first one.

    Regards,

    Norbert.
    Last edited by NOB; 30-03-2007, 08:23.

    Comment

    • NOB
      Senior Member
      Zabbix Certified Specialist
      • Mar 2007
      • 469

      #3
      Hi,

      here is the patch:
      Code:
      *** charts.php.orig     Tue Mar 27 11:34:18 2007
      --- charts.php  Fri Mar 30 08:24:33 2007
      ***************
      *** 102,104 ****
              {
      !               if(! ($row = DBfetch(DBselect(" select distinct g.name from hosts h, items i, graphs_items gi, graphs g ".
                                              " where h.status=".HOST_STATUS_MONITORED.
      --- 102,104 ----
              {
      !               if(! ($row = DBfetch(DBselect(" select distinct g.name, h.host from hosts h, items i, graphs_items gi, graphs g ".
                                              " where h.status=".HOST_STATUS_MONITORED.
      It fixes this issue for me.
      The location of the file in the source is: frontend/php/charts.php
      if somebody wants to apply the fix in his installation.
      I guess Alexei knows where the file is :-)

      Regards,

      Norbert.
      Last edited by NOB; 30-03-2007, 08:30.

      Comment

      Working...