The Zurich release has arrived! Interested in new features and functionalities? Click here for more

Metric Definitions to track Incident States not working for "Closed"

jnovack
Kilo Guru

In a Helsinki (I know, I know) demo instance, there's a metric definition to track Field State Definition for Incident State (metric_definition.sys_id=35f2b283c0a808ae000b7132cd0a4f55), then another to "clean up" when Active=False (metric_definition.sys_id=39d631fcc0a808ae00486d7bad874380).

The Incident State Duration metric works as expected.

find_real_file.png

However, it adds a new metric definition when State=Closed (again, as expected), however, that NEVER gets closed.   It will remain "calculation complete = false" until the end of time as we know it! I'm not sure it's necessary to keep.

To combat that, there is a "Open" metric.

find_real_file.png

find_real_file.png

Although, it appears this gets run BEFORE the "Incident State Duration" or at least causes a race condition, where MTRC0000007 never closes the "Closed" metric.

Should it? Am I doing it wrong(tm) by believing that Closed should not be created or should be "calculation complete = false"?   Is my paradigm off?

I'm under the belief that (a) Closed metric shouldn't be created, or (b) the "MTRC0000007" should be setting "calculation complete = true" on the Closed metric.

1 ACCEPTED SOLUTION

jnovack
Kilo Guru

Race Condition gave it away after thinking about it.



The order was wrong.   MTRC0000007 was running before the final MTRC0000004.   Thus MTRC0000007 was never running closeDurations on the metric that would be created later in the order from MTRC0000004.



Boom!


View solution in original post

1 REPLY 1

jnovack
Kilo Guru

Race Condition gave it away after thinking about it.



The order was wrong.   MTRC0000007 was running before the final MTRC0000004.   Thus MTRC0000007 was never running closeDurations on the metric that would be created later in the order from MTRC0000004.



Boom!