Ad Widget

Collapse

Graphs sql query error-web interface

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • aorlowski
    Junior Member
    • Feb 2006
    • 21

    #1

    Graphs sql query error-web interface

    Hello,

    I have been using zabbix now for a year or so and love it. Not to many problems until recently i get this error in the web interface. It happens when i go to configure->graphs, I pull down the group menu to "all" and host menu "all".

    ERROR:

    * Error in query [select distinct g.* from graphs g left join graphs_items gi on g.graphid=gi.graphid left join items i on gi.itemid=i.itemid while (g.graphid div 100000000000000) in (0) and ( i.hostid not in (-1) OR i.hostid is NULL ) order by g.name, g.graphid] [You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'while (g.graphid div 100000000000000) in (0) and ( i.hostid not in (-1) OR i.' at line 1]
    * mysql_fetch_array(): supplied argument is not a valid MySQL result resource[/var/www/html/supermon/include/db.inc.php:411]


    Im not a mysql guru but if there is anything i can do on the db to fix issue I am confident i could do that.

    Thanks!
  • Alexei
    Founder, CEO
    Zabbix Certified Trainer
    Zabbix Certified SpecialistZabbix Certified Professional
    • Sep 2004
    • 5654

    #2
    Please search ZABBIX Forums. The patch already exists. It replaces 'while' by 'where' in the SQL query.
    Alexei Vladishev
    Creator of Zabbix, Product manager
    New York | Tokyo | Riga
    My Twitter

    Comment

    • aorlowski
      Junior Member
      • Feb 2006
      • 21

      #3
      Thanks Alexei

      not to be bothersome, is this patch for 1.4.2?

      I will search for the patch.

      Comment

      • Alexei
        Founder, CEO
        Zabbix Certified Trainer
        Zabbix Certified SpecialistZabbix Certified Professional
        • Sep 2004
        • 5654

        #4
        Yes, it is for 1.4.2. The problem is 1.4.2 specific, no other releases are affected.
        Alexei Vladishev
        Creator of Zabbix, Product manager
        New York | Tokyo | Riga
        My Twitter

        Comment

        • aorlowski
          Junior Member
          • Feb 2006
          • 21

          #5
          graphs.php resolved

          ok, so for those who are having this error, you will have another place to search.

          cd /var/www/html/<sitename>
          cp graphs.php graphs.php.bak
          vi graphs.php // go to line 348 change "while" to "where"
          save file
          restart httpd

          Comment

          • Aly
            ZABBIX developer
            • May 2007
            • 1126

            #6
            You don't need to restart httpd after changing scripts.
            Zabbix | ex GUI developer

            Comment

            • aorlowski
              Junior Member
              • Feb 2006
              • 21

              #7
              correct

              force of habit.

              thanks

              Comment

              Working...