When an agents fails, PEGA0010 alert is written to log file and optionally sent to AES / PDC. In the Pega platform, there is no class to store alerts, so you can't capture it with a rule declare trigger.
In AES, PEGA0010 alerts are stored as instances of PegaAES-Data-Alert, and various decision tables are used to assess that it is a critical alert and the Agent failure scorecard should be sent immediately.
I imagine one could enhance AES to add a new scorecard for a specific agent failure, and then send that scorecard to parties interested in that particular scorecard.
Out of curiosity - why not send scorecards for all agent failures? Are there specific agents that are expected to fail in production? Is there any reason to ignore certain agents failing?
Great question, not really there is any OOTB agent that we want to ignore.
But, somehow we saw in recent past - our app specific agents only going down, not frequently though. Every time user sees that they are not getting their work objects (there is an agent that we created - used to get work from the legacy system and seed into Pega). By the time we get to know about this issue, it is usually 3-4 days for various reasons. And the simple go to is - to check if the specific agent is running and most of the times the agent went down.
As rightly mentioned by you, I believe its definitely a good enhancement to have a new scorecard for the specific agent failure.