<@ULVA73B9P> How to set up automations so that if ...
# ask-marvin
d
@Marvin How to set up automations so that if a concurrency limit is acquired but not released in a set period, it should alert The following does not seem to trigger { "type": "event", "match": {}, "match_related": {}, "after": [ "prefect.concurrency-limit.acquired" ], "expect": [ "prefect.concurrency-limit.released" ], "for_each": [], "posture": "Proactive", "threshold": 1, "within": 20 }
m
To set up an automation in Prefect 3.x that alerts you if a concurrency limit is acquired but not released within a set period, you need to ensure that your automation configuration is correct. Here are some key points to consider: 1. Event Matching: Ensure that the events you are matching (
prefect.concurrency-limit.acquired
and
prefect.concurrency-limit.released
) are being emitted correctly by the system. You might want to double-check your flow's execution to see if these events are indeed being triggered. 2. Expect and After Parameters: The
expect
parameter should contain the event that you expect to occur after the
after
event within the specified time frame. Your configuration seems correct in this regard, but make sure that the events are actually being logged. 3. Threshold and Within Parameters: The
threshold
parameter specifies how many times the
expect
event must occur within the
within
time frame (in seconds). You have set this to 1 and 20 seconds, respectively, which should work if the events are being captured. 4. Alert Configuration: Ensure that your alerting mechanism (e.g., email, webhook) is correctly set up. You can follow the example of setting up email alerts as detailed in the Prefect documentation. 5. Concurrency Limit Setup: Make sure your concurrency limits are properly configured. You can use the Prefect CLI to inspect or update concurrency limits. More details can be found in the Concurrency Limits documentation. If your configuration is correct and the issue persists, you might want to look into whether there are any bugs related to concurrency limits not being released, although no issues were found in the GitHub repository at this time.