Reporting and Analytics for Service

Get Involved. Join the Conversation.

Topic

    Pavol Procka
    Help with an Alert
    Topic posted January 7, 2019 by Pavol ProckaSilver Crown: 22,500+ Points 
    54 Views, 4 Comments
    Title:
    Help with an Alert
    Summary:
    Alert for number of emails routed to a Queue
    Content:

    Hi,

    Can anyone maybe help me with setting up an alert? I have a simple report showing incidents that arrived in specific queues and am trying to create an alert that sends an email every time 10 or more emails were added to the queues within the last hour.

    You will see I created variables for start and end times, but the exception I tried would not work:

     

    (count( if(queue_stats.created>$start_time & queue_stats.created<$end_time,1, 0)))/((date_diff($end_time, $start_time))/3600) is greater or equals 10

    Many Thanks

    Pavol

    Document:

    Comment

     

    • Sebastiaan Draaisma

      Hi Pavol.

      Try:

      (date_diff(sysdate(), queue_stats.created))/3600

      Is greater or equals

      10

      This will automatically give you a 10+ hour between created and system date.

    • Sebastiaan Draaisma

      Ah sorry Pavol.

      I didn't read your request properly. You wanted 1 hour and 10+ email :-)
      Have a look at the attached report. I used the time in a runtime filter and a count for the incidents inside the exception. To include the incidents I have used a group concat. This way you can include the incidents without having to use custom scripts to count the rows.

      To have it more fancy looking you would need to use custom scripts and perform row counts and use a system variable to store the row count in that you can use in your exception. This however is the lazy aproach which might be sufficient for your alert :-)

    • Pavol Procka

      Hi Sebastiaan,

      many thanks for your efforts! I did try the first suggestion, but as you correctly noticed, it wouldn't work. Unfortunately I did not have time to answer before you did :)
      Anyway, am gonna test the other one now and will update here, if not today, for sure tomorrow.

      Once again, many thanks, you are a STAR!!!

      Many Thanks

      Pavol

    • Sebastiaan Draaisma

      You are welcome Pavol :-)
      Alternatively concat some extra fields of interest and sorting to make it look the way you want

      group_concat(incidents.ref_no||'       '||queue_stats.created,'\n',queue_stats.created,DESC)