Monitoring Mirror Health
I've been trying for a while to come up with a set of tools to monitor the health of a mirror set and email a report nightly on the status of the mirror, or flag issues in real time.
Making sure that all the databases are caught up, that all the mirror members are online.
I've tried a number of methods I've found to try to access the state of the mirror and mostly found they're internal or unsupported routes, (that when questioning WRC have swiftly been removed from the online documentation...). The best I've found is %SYSTEM.Mirror, but that just lists the state of the entire mirror set and doesn't appear to be at the database level.
At the moment I have a custom routine in ZMIRROR that emails me when the failover mirror becomes primary, so I know that a mirror switch has taken place. That only works if the entire server fails over, and doesn't give me any insight into the status of the DR mirror.
Ideally I'd like the current primary to list the status of the other nodes and then email a status, or if it loses connectivity to a DR node or a reporting node it flags it with some actions, (email, REST call, etc). I can call GetStatus on a given node, but if that node it down then it won't run and I don't know how to call it to check the status of a remote node.
The methods in SYS.Mirror all seem to be related to working with mirrors from the perspective of the mirror I'm on.
##class(SYS.Mirror).AsyncDejournalStatus() for example seems to only work on the async mirror and not on the primary.
What tools / methods do other people use to monitor their mirror health from within Iris/cache?