You can check it from System Monitor Log of each Mirror member. You can see an example of the log:
05/22/23-07:22:26 [SYSTEM MONITOR] System Monitor started in %SYS
05/22/23-07:26:07 [SYSTEM MONITOR] Mirror status changed. Member type = Failover, Status = Backup
05/22/23-07:33:01 [SYSTEM MONITOR] System Monitor started in %SYS
05/22/23-07:33:01 [SYSTEM MONITOR] Mirror state: Member type = Failover, Status = Synchronizing
05/22/23-07:33:31 [SYSTEM MONITOR] Mirror status changed. Member type = Failover, Status = Backup
05/22/23-07:35:55 [SYSTEM MONITOR] System Monitor started in %SYS
05/22/23-07:35:56 [SYSTEM MONITOR] Mirror state: Member type = Failover, Status = Transition
05/22/23-07:36:26 [SYSTEM MONITOR] Mirror status changed. Member type = Failover, Status = Waiting
05/22/23-07:36:26 1 alerts posted in messages.log
05/22/23-07:40:26 [SYSTEM MONITOR] Mirror status changed. Member type = Failover, Status = Backup
05/22/23-07:58:15 [SYSTEM MONITOR] System Monitor started in %SYS
05/22/23-07:58:15 [SYSTEM MONITOR] Mirror state: Member type = Failover, Status = Waiting
05/22/23-08:06:43 [SYSTEM MONITOR] Mirror status changed. Member type = Failover, Status = Backup
05/22/23-08:10:37 [SYSTEM MONITOR] System Monitor started in %SYS
05/22/23-08:10:37 [SYSTEM MONITOR] Mirror state: Member type = Failover, Status = Waiting
05/22/23-08:34:40 1 alerts posted in messages.log
05/22/23-08:35:10 [SYSTEM MONITOR] Mirror status changed. Member type = Failover, Status = Backup
05/22/23-10:50:25 [SYSTEM MONITOR] System Monitor started in %SYS
05/22/23-10:50:25 [SYSTEM MONITOR] Mirror state: Member type = Failover, Status = Waiting
05/22/23-11:00:15 [SYSTEM MONITOR] Mirror status changed. Member type = Failover, Status = Backup
05/26/23-11:03:06 [SYSTEM MONITOR] System Monitor started in %SYS
05/26/23-11:03:07 [SYSTEM MONITOR] Mirror state: Member type = Failover, Status = Transition
05/26/23-11:03:37 [SYSTEM MONITOR] Mirror status changed. Member type = Failover, Status = Backup
05/26/23-11:05:08 [SYSTEM MONITOR] Mirror status changed. Member type = Failover, Status = Primary
05/26/23-11:05:10 1 alerts posted in messages.log
Easiest way would be look in the cconsole.log in the instance directory.
ccontrol qlist has information about the current mirror state on that server but you need a before and after to know if there was a failover.
You can check it from System Monitor Log of each Mirror member. You can see an example of the log:
In addition to checking the logs, you can configure ^MONMGR and you'll get emailed on a failover (or any other significant Caché/IRIS event).
There's also ^%SYSMONMGR for notifications on other Caché/IRIS system-health events.
Use the ^ZMIRROR Routine, you need NotifyBecomePrimary callback.