Skip to content

Commit

Permalink
add minimal_default_enricher for getting minimal base notifications f…
Browse files Browse the repository at this point in the history
…or alerts
  • Loading branch information
arikalon1 committed Dec 18, 2024
1 parent 7e5d9a0 commit c434f1a
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
2 changes: 2 additions & 0 deletions docs/playbook-reference/actions/event-enrichment.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
10 changes: 10 additions & 0 deletions playbooks/robusta_playbooks/alerts_integration.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
"""
Expand Down

0 comments on commit c434f1a

Please sign in to comment.