Gateway master db_tag

Is it possible to create a database tag that can be logged and tells me which gateway system is acting as the master?

I have a gateway timer script that runs every 30 seconds or something

from import InetAddress
nodename = InetAddress.getLocalHost().getHostName() 
if nodename == 'SCDAPOL1':
	system.tag.writeToTag('NodeName', nodename)
elif nodename == 'SCDAPOL2': 
         system.tag.writeToTag('NodeName', nodename)

There is a system tag for this in 7.3.0, you can use this code:#assuming the master node is SCDAPOL1 master = system.tag.getTagValue("[System]Gateway/Redundancy/IsMaster") if master: system.tag.writeToTag('NodeName', 'SCDAPOL1') else: system.tag.writeToTag('NodeName', 'SCDAPOL2')Or better yet, just use an expression:if({[System]Gateway/Redundancy/IsMaster},"SCDAPOL1","SCDAPOL2")

Works great!

Thank you