Ad Widget

Collapse

Zabbix 1.5 - Dashboard - NULL reference in Query

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Palmertree
    Senior Member
    • Sep 2005
    • 746

    #1

    Zabbix 1.5 - Dashboard - NULL reference in Query

    Found a Null reference (hosts) in a query for the dashboard causing slowness due to table scans. After removing the NULL reference, the Dashboard is much faster now. :-)

    Modified blocks.inc.php around line number 689

    Before:
    Code:
            $sql = 'SELECT DISTINCT g.groupid, g.name '.
                            ' FROM httptest ht, applications a, [COLOR="Red"]hosts h[/COLOR], groups g, hosts_groups hg '.
                            ' WHERE hg.hostid in ('.$available_hosts.') '.
                                    ' AND hg.hostid=a.hostid '.
                                    ' AND g.groupid=hg.groupid '.
                                    ' AND a.applicationid=ht.applicationid '.
                                    ' AND ht.status='.HTTPTEST_STATUS_ACTIVE.
                            ' ORDER BY g.name';
    Code:
            $sql = 'SELECT DISTINCT g.groupid, g.name '.
                            ' FROM httptest ht, applications a, groups g, hosts_groups hg '.
                            ' WHERE hg.hostid in ('.$available_hosts.') '.
                                    ' AND hg.hostid=a.hostid '.
                                    ' AND g.groupid=hg.groupid '.
                                    ' AND a.applicationid=ht.applicationid '.
                                    ' AND ht.status='.HTTPTEST_STATUS_ACTIVE.
                            ' ORDER BY g.name';
  • Aly
    ZABBIX developer
    • May 2007
    • 1126

    #2
    Thanks a bunch. fixed.
    Zabbix | ex GUI developer

    Comment

    Working...