Extension 2.0 F5 instance sync

This is how ‘state’ metrics are implemented across all 2.0 extensions; a constant value of 1 is reported and a dimension (e.g. state) is used to indicate the current active state.  Even though in this example it is a ‘number’ representing the state it is more accurately treated as the string that it maps to (e.g. the ‘average’ of the state value would be meaningless along with other mathematical operations).

The current approach can be used for creating metric events for alerting through dimension filters in the metric event configuration. For example, knowing that the value is always going to be 1 with the current state as the ‘sync.state’ dimension if you wanted to alert when the state is anything other than ‘active’ you would set your threshold to be ‘above 0’ and use a dimension filter for ‘sync.state’ with operator ‘does not equal’ and the dimension value as ‘4’ (active). Whenever the conditions are met (e.g. a 1 is reported with the dimension being anything other than ‘4’) you know that the state is being reported still and is something other than ‘active.’

You can also use this approach to create alerts whenever a specific state becomes active through the metric event configurations with the ‘dimension filters’ being the most important configuration.

I’ll attach some images from another extension to illustrate this (in this example the dimension/state is reported as a string as opposed to an enum/string mapping):