-
Notifications
You must be signed in to change notification settings - Fork 264
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
Feature: additional actions/links to be renderd in sink Findings #814
Comments
Thanks for reporting it @Dariusch How would you configure those links? |
Not all of the alerts have those links.
For example the PrometheusRules configured by the kube-prometheus-stack do not have those annotations. A flux alert could link to a dashboard for example: ---
apiVersion: monitoring.coreos.com/v1
kind: PrometheusRule
metadata:
name: flux-rules
namespace: monitoring
spec:
groups:
- name: flux
rules:
- alert: ReconciliationFailure
expr: max(gotk_reconcile_condition{status="False",type="Ready"}) by (exported_namespace, name, kind) + on(exported_namespace, name, kind) (max(gotk_reconcile_condition{status="Deleted"}) by (exported_namespace, name, kind)) * 2 == 1
for: 3m
labels:
severity: warning
team: engineering
annotations:
summary: '{{ $labels.kind }} {{ $labels.exported_namespace }}/{{ $labels.name }} reconciliation failed'
description: '{{ $labels.kind }} {{ $labels.exported_namespace }}/{{ $labels.name }} reconciliation failed for more than 10 minutes'
dashboard_url: https://grafana.${domain}/d/flux-cluster/flux-cluster-stats?orgId=1&refresh=30s Or add the runbook URL. I guess a proposed solution would be to add a list to the slack sink config which is mutated into the slack schema like - slack_sink:
# Other values
actions:
- type: button
text: 'Runbook :green_book:'
url: '{{ (index .Alerts 0).Annotations.runbook_url }}' |
See also #735 |
FYI, we made some improvements around including links in Slack messages here: #967 It doesn't handle existing links from annotations/labels on the alert. But we're thinking about expanding this to your use case, as well as showing links from annotations in the Robusta UI. |
Is your feature request related to a problem?
Most of our alerts are enriched with additional annotations like
dashboard_url
andrunbook_url
to make debugging and resolving issues faster. Not everything can be automated, sadly...Those annotations were previously used to render slack actions/links to the specified hyperlinks.
Describe the solution you'd like
Passing additional (external) links to the (slack_)sink configs which are then rendered when present on the alert.
Describe alternatives you've considered
Currently, only robusta-provided links to the UI are configured: https://github.com/robusta-dev/robusta/blob/master/src/robusta/integrations/slack/sender.py#L282-L303
Additional context
The example I am talking about is described here.
The text was updated successfully, but these errors were encountered: