Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add minimal_default_enricher for getting minimal base notifications f… #1662

Merged
merged 1 commit into from
Dec 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading