Thanks for this article. I have used it and placed it on my SQL clusters.
I took it a step further and created another table.
CREATE TABLE [dbo].[ClusterFailoverHistory](
[PreviousActiveNode] [varchar](30) NULL,
[CurrentActiveNode] [varchar](30) NULL,
[LastUpdated] [datetime] NULL
) ON [PRIMARY]
In your original code, I creaeted one more line after the final update.
I insert the history of the failover having occurred.
update CLUSTERFAILOVERMONITOR set PREVIOUS_ACTIVE_NODE=@VAR2
Insert into ClusterFailoverHistory
Select @VAR1, @var2, GETDATE()