Get active gateway node name?

We have a redundant setup and I’m wondering if there’s any way for a transaction group to see which node is the master node. I’m looking through the Server section of the Ignition OPC server tags and I don’t see anything.

I’m putting together a meta-project to report on the state of our projects, and I thought it would be good to include which node is currently the master.

You can use the role system tag:

[System]Gateway/Redundancy/Role

It will show whether or not the connected server is master or backup. You could always make an expression tag that looked at the tag and returned your own name.

I thought some of the newer versions had this built in?

if not this will work

from java.net import InetAddress
nodename = InetAddress.getLocalHost().getHostName() 
system.tag.writeToTag('NodeName', nodename)

where NodeName is a tag

[quote=“diat150”] from java.net import InetAddress nodename = InetAddress.getLocalHost().getHostName() system.tag.writeToTag('NodeName', nodename)
[/quote]

That pretty much did it. Put that into a function in a script module that returns the host name. That can even be used in an expression tag in a transaction group, using runScript().

Also, I think, runScript(“system.util.getGatewayAddress()”) in an expression tag would work.