2 Replies Latest reply on Dec 29, 2016 12:42 PM by franciscos RSS
    franciscos Explorer

    Alerts History



    I've a template that has over 1000 devices. I want to get a count of all the alerts that were fired for these devices in the last 6 hours using the API. I've used Services/GetAlertHistory with the startDate and endDate just fine, problem is I've to do one call per device and all that is taking more than 4 minutes to conclude with these many devices. Is there no way to get the history for the entire template in one call? I want to reduce the time this takes to load.


    Thank you for your help in advance

      • Re: Alerts History
        adamr Creator



        There is a system Stream named AlertHistoryStream where all of this data is stored.  It is a System Object so not visible by default in Composer (nor is it ever editable).  You can see it by going to the advanced filter options and checking the Show System Objects checkbox.  It does include default services for streams that will allow you to query directly.  Be sure to use the built in Date filters when querying or you will eventually see performance issues.




          • Re: Alerts History
            franciscos Explorer

            Hello Adam,

            Thank you for your response. This seems to work great, I get a significant improvement in terms of performance. I have just one question though: There seems to be no way to limit the alerts that you get to a specific template and from what I can see in the data that I'm receiving there is no information on which template each entry belongs to. Am I missing something or should I've a list of devices per template and match it to each entry that I get from the stream?


            Thank you again.