Record 'Recent Slow Response Events'

You can access the MetricRegistry:

Which is a class directly from a third party library.
You could ask it for the set of gauges it contains, which will return a dictionary:

The Guage object you get from that dictionary (at the ClockDriftDetector.driftGauge key) will have a getValue method: Gauge - metrics-core 4.0.3 javadoc

So it would look something like:

from com.inductiveautomation.ignition.gateway import IgnitionGateway

__gateway = IgnitionGateway.get()
__metrics = __gateway.metricRegistry
__driftGauge = __metrics.gauges["ClockDriftDetector.driftGauge"]

def getDriftValue():
	return __driftGauge.value
3 Likes