It's pretty easy to get the Client IP address via {[System]Client/Network/IPAddress}
However, the same thing does not exist for the gateway. The similarly named tag {[System]Client/Network/GatewayAddress} returns the full address (i.e. http://localhost:8088).
How can I get the IP address of the gateway?
I'll have clients connected to specific gateways in different areas of the plant, all running the same project, and I need to determine which area based on which gateway they're connected to.
I can use replace(replace({[System]Client/Network/GatewayAddress},"http://",""),":8088","") to peel the IP out in that case, since they're all on :8088.
An expression tag at the gateway scope will work for my use case.
runScript("system.net.getIpAddress()")
I had been trying to use a client tag, but since it's by definition gateway-dependent, there's really no need for every client to have its own tag with the gateway IP.