count() trigger expression makes inefficient queries on MySQL databases

XMLWordPrintable

    • Type: Incident report
    • Resolution: Duplicate
    • Priority: Minor
    • None
    • Affects Version/s: 2.0.3
    • Component/s: Server (S)
    • None

      We had a trigger with the expression:

      {T_OS_Generic:icmppingloss.count(86400,0,"gt")}

      >20 &

      {T_OS_Generic:icmppingloss.avg(#3)}

      <100

      Unfortunately this result in a database query like:
      select value from history where itemid=1604447 and clock>1352704830 and clock<=1352791230

      Which is inefficient and bogs down the whole DB, especially doing multiple such queries for data gathered every 60 seconds from hosts (this results in 1440 fetched rows per checked item)

            Assignee:
            Unassigned
            Reporter:
            Łukasz Jernaś
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: