Ad Widget

Collapse

Problematic Query in Zabbix

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • tammyt
    Junior Member
    • Mar 2017
    • 11

    #1

    Problematic Query in Zabbix

    Hello there

    For a few weeks now I have been have problems with this query

    "SELECT h.* FROM history_uint h WHERE (h.itemid BETWEEN '651600' AND '651651' OR h.itemid BETWEEN '651660' AND '651671' OR h.itemid BETWEEN '651673' AND '651677' OR h.itemid BETWEEN '651681' AND '651750' OR h.itemid BETWEEN '651844' AND '651868' OR h.itemid BETWEEN '651874' AND '651881' OR h.itemid BETWEEN '651883' AND '651889' OR h.itemid BETWEEN '651891' AND '651923' OR h.itemid BETWEEN '651925' AND '651936' OR h.itemid BETWEEN '875746' AND '875750' OR h.itemid BETWEEN '1374509' AND '1374514' OR h.itemid IN ('651653','651654','651655','651657','651658','651 679','651870','651871','736559','741031','741032', '751589','789537','804598','811651','877500','8775 01','953831','957805','957806','961030','985045',' 1041493','1041494','1041495','1109733','1109734',' 1120543','1120544','1144970','1144971','1160945',' 1201127','1380676','1380677','1386334','1418475',' 1492880','1506486','1512747','1539725','1539726',' 1539727')) AND h.clock>='1522033200' AND h.clock<='1522072034' ORDER BY h.clock"

    Zabbix keeps sending lots of this same query (changing only the period in the h.clock), and the query keeps geting stuck, making the database CPU go 100%.
    I asked the help of a DBA, as I didnt change anything in the zabbix and this problem started out of nowhere, and he tried lots of things, including indexing this select, and the problem continues.

    Someone knows what this query does and why zabbix started sending so many of those? I am lost

    Thank you
  • LenR
    Senior Member
    • Sep 2009
    • 1005

    #2
    Is this during a time when housekeeper is running? If not, it's either server or frontend action causing the trigger. I use myphpadmin to find decode the itemid back to a host item but there are many ways. Then check that you don't have "expensive" triggers on that item or users flogging the GUI.

    Comment

    • tammyt
      Junior Member
      • Mar 2017
      • 11

      #3
      Is this during a time when housekeeper is running?
      No

      The DB server is all closed in amazon, and only accessible via zbx server(console only)

      I am sorry, but i have really little knowledge in db, so i dont even know how to check what is those itemids (a simple select would work?)
      About the users, only 3 admin users access the GUI of Zabbix, but we gave a Grafana connecting to the zabbix API. If thats the cause, how could I check which dashboard is the villain?

      Thank you very much for the help

      Comment

      • dimir
        Zabbix developer
        • Apr 2011
        • 1080

        #4
        This SQL comes from frontend because all server SQL statements are lower-cased. Check which frontend pages you have opened, looks like "Monitoring -> Latest data".

        Comment

        Working...