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

Problem widget is making SQL request with LIMIT 1001

XMLWordPrintable

    • Icon: Problem report Problem report
    • Resolution: Won't fix
    • Icon: Minor Minor
    • None
    • 4.0.12
    • Frontend (F)
    • Debian 10, 4GB RAM, 4 vCPU, Zabbix 4.0.12, SAS RAID 1, 306 values/sec

       

      I'm experiencing problem with frontend widget of type Problems - History. In widget settings (complete screen in attachment) I'm requesting last 50 problems, however, SQL query has set LIMIT 1001 which is causing DB overload (executing query takes > 30s in my environment). I think this query should be optimized.

       

      Zabbix is running this query:

      SELECT e.eventid,e.objectid,e.clock,e.ns,e.name,e.severity FROM events e WHERE e.source='0' AND e.object='0' AND e.severity IN (3,4,5) AND NOT EXISTS (SELECT NULL FROM event_suppress es WHERE es.eventid=e.eventid) AND e.value=1 ORDER BY e.eventid DESC LIMIT 1001
      

       

            mbuhholcs DaneT
            ekrajnak Blažej Krajňák
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: