A certain periodic task is supposed to happen once a minute. I send an alert when this is hanging using the following condition in a Threshold Alert.
WHEN count() GROUPED OVER top 1 'myPeriodicTaskLog' IS BELOW 1 FOR THE LAST 2 minutes
My complication: This task is occurring separately in multiple Docker Instances, and I want to check that none of them is blocked.
I want to say "The key
myPeriodicTaskLog must occur each minute in each instance. Otherwise send an alert."
I have the field
instance_name. Each instance's name is assigned pseudorandomly on each deployment (i.e., something like
"a58hgh12g2"). So, I cannot code the condition to include these names as literals but can use these values to aggregate.
How do I group in this way?