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

MySQL sql-mode Value Breaks The Graphs Configuration Page

XMLWordPrintable

      I couldn't create graphs for hosts when configuring them. The graphs page (/graphs.php) didn't show any graphs for hosts that have them and the button to create a new graph was disabled. In addition, the Groups and Hosts select boxes didn't have any options in them (see attached screen shot). After a little research I realized that the sql mode MYSQL40 cause the query for hosts to fail.

      In api/classes/CHostGroup.php on line 236 I changed ...

      $sqlParts['where'][] = 'NOT h.status IN ('.HOST_STATUS_PROXY_ACTIVE.','.HOST_STATUS_PROXY_PASSIVE.')';

      ... to ...

      $sqlParts['where'][] = 'h.status NOT IN ('.HOST_STATUS_PROXY_ACTIVE.','.HOST_STATUS_PROXY_PASSIVE.')';

      ... and this fixed the graphs page for me. I verified that the page works without my fix if the MySQL server is running in TRADITIONAL mode. My fix works in both modes and that's how I'm running it now.

      Thanks,
      Tony

            Unassigned Unassigned
            jwtire Jack Williams Tire
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: