Ad Widget

Collapse

Summary Email

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • satchelp
    Junior Member
    • Jul 2008
    • 13

    #1

    Summary Email

    Hi,

    Is there anyway to setup a summary email that sends something like, "Triggers X, Y and Z have been on for the past hour." Or maybe even, "There are multiple true triggers." I'm running 1.4 and know there is no escalation, but I don't like the idea that if I miss a few emails I could have several alerts that I am unaware of.


    Thanks,

    Satchel
  • nelsonab
    Senior Member
    Zabbix Certified SpecialistZabbix Certified Professional
    • Sep 2006
    • 1233

    #2
    You'll have to write your own script that queries the database and then sends the email. I think there was a post I replied to a while ago with some SQL code to tell you what triggers were active and so forth.

    Here is an SQL query which will show you what triggers are active. You'll need to add a join if you want to also show if something is acknowledged.

    Code:
    select distinct t.triggerid, t.description, t.lastchange, h.host, e.acknowledged 
      from triggers t, hosts h, items i, functions f, events e 
      where f.itemid=i.itemid 
        and h.hostid=i.hostid 
        and t.triggerid=f.triggerid 
        and t.status=0 and i.status=0 
        and t.value=1 
        and t.lastchange!=0 
        and e.objectid=t.triggerid 
      order by lastchange;
    The query was essentially yanked from the PHP code. :-)
    RHCE, author of zbxapi
    Ansible, the missing piece (Zabconf 2017): https://www.youtube.com/watch?v=R5T9NidjjDE
    Zabbix and SNMP on Linux (Zabconf 2015): https://www.youtube.com/watch?v=98PEHpLFVHM

    Comment

    • satchelp
      Junior Member
      • Jul 2008
      • 13

      #3
      Thanks for the reply. I'll give that a shot.


      -Satchel

      Comment

      • satchelp
        Junior Member
        • Jul 2008
        • 13

        #4
        Could you show the sql query with the join included to ignore acknowledged alerts? I can't seem to get just a list of active but unacknowledged alerts.

        Thanks!

        -Satchel

        Comment

        Working...