Get device Hostname in tag or scripting API

I need to read the devices IP addresses in a diagnostics mimic, is there any way to get the IP as a tag or through scripting?

These are exposed as tags in the OPC UA server for each device under the diagnostics folder

I should have been more specific. I can’t find this exposed tag on a DNP3 device.