diff --git a/docs/playbook-reference/actions/event-enrichment.rst b/docs/playbook-reference/actions/event-enrichment.rst index 72d92c415..bbc46e723 100644 --- a/docs/playbook-reference/actions/event-enrichment.rst +++ b/docs/playbook-reference/actions/event-enrichment.rst @@ -126,6 +126,8 @@ These actions enrich Prometheus alerts and only support the :ref:`on_prometheus_ .. robusta-action:: playbooks.robusta_playbooks.alerts_integration.default_enricher +.. robusta-action:: playbooks.robusta_playbooks.alerts_integration.minimal_default_enricher + .. robusta-action:: playbooks.robusta_playbooks.alerts_integration.foreign_logs_enricher .. robusta-action:: playbooks.robusta_playbooks.alerts_integration.alert_foreign_logs_enricher diff --git a/playbooks/robusta_playbooks/alerts_integration.py b/playbooks/robusta_playbooks/alerts_integration.py index 11f8e9007..2fb03ed5f 100644 --- a/playbooks/robusta_playbooks/alerts_integration.py +++ b/playbooks/robusta_playbooks/alerts_integration.py @@ -208,6 +208,16 @@ def alert_explanation_enricher(alert: PrometheusKubernetesAlert, params: AlertEx ) +@action +def minimal_default_enricher(alert: PrometheusKubernetesAlert): + """ + Enrich an alert with the original message only, without any labels or annotations. + + This can be used to get more concise alerts notifications + """ + alert.add_enrichment([]) + + @action def default_enricher(alert: PrometheusKubernetesAlert, params: DefaultEnricherParams): """