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.
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.