Dynamic Alarm Pipeline Delay

Is there a way to set an alarm pipeline's delay block dynamically? like using a string from an alarm's label, etc. to set the delay block's value.

Were currently using a fixed alarm delay but we would like to make a one-size-fits all alarm pipeline that can cater different settings.

The delay block can't be configured, but you can set it to the least-common-factor of the different delays you want to use, then loop the pipeline around the delay block, incrementing a counter, until your desired delay is met.

2 Likes

How do you feel about a script block using sleep(event['some_associated_data_with_a_configured_delay']) ?

I kinda feel like I already know the answer, which is likely to be the same as always when we mention sleep, but I figured I'd ask.

Yeah, I don't know offhand the threading strategy used in alarm pipelines, but I can tell you that the delay block uses a dedicated async thread for the blocking operation, distinct from the main execution thread. You can't really do that via scripting. Unsafe, I would not attempt, etc.

1 Like