Hi! I'm curious if there's a way to filter slack a...
# community-support
s
Hi! I'm curious if there's a way to filter slack alerts from the monitor command by dbt_user or orchestrator? For context, we generate alerts against our production target as part of an airflow DAG. Very occasionally, users will locally run dbt models against the production target and in those very instances when these invocations result in an error, we don't want to generate a slack alert.
a
Hey @Spencer Bonar We currently support filtering alerts by tag, owner, model, status and resource type. https://docs.elementary-data.com/guides/alerts-configuration#filter-alerts But we don’t support filtering by dbt_user or orchestrator. I am very curious, why you don’t want to be alerted in this case?
A possible solution would be having a
local-dbt-runs
channel to send the alerts of these occasional local runs:
Override configuration from dbt project: Sometimes, for example during testing and development, you want all your alerts sent to a single slack channel, without suppression, regardless of how they are configured in the model config block or schema.yml in your dbt project. You can do this by using this flag. Please note that when using this flag without passing a suppression interval parameter, the suppression interval for all the alerts will be overridden by the default value, 0
edr monitor --override-dbt-project-config --slack-token <your_slack_token> --slack-channel-name <slack_channel_to_post_at> --suppression-interval 0
s
I am very curious, why you don’t want to be alerted in this case?
Sorry, I can do a better job of explaining here! In these instances, in which a user is running a model against a production target and there's a failure, they're already getting that failure message in terminal because they're running locally. So the slack message ends up being superfluous. But again, a pretty infrequent edge case for us, I just figured I'd ask. That said...adding
dbt_user
and
orchestrator
to the alerts model might generally be useful? Just so that when I'm reviewing slack alerts I have that context