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

Use alert labels in the custom_graph_enricher graph_title #1137

Closed
v2nek opened this issue Oct 28, 2023 · 2 comments · Fixed by #1198
Closed

Use alert labels in the custom_graph_enricher graph_title #1137

v2nek opened this issue Oct 28, 2023 · 2 comments · Fixed by #1198
Labels
enhancement New feature or request

Comments

@v2nek
Copy link

v2nek commented Oct 28, 2023

Is your feature request related to a problem?
It is not possible to use alert labels in the graph_title

Describe the solution you'd like
I'd like it to be templated into the final image of the custom_graph_enricher

Describe alternatives you've considered

Additional context

@github-actions
Copy link

Hi 👋, thanks for opening an issue! Please note, it may take some time for us to respond, but we'll get back to you as soon as we can!

  • 💬 Slack Community: Join Robusta team and other contributors on Slack here.
  • 📖 Docs: Find our documentation here.
  • 🎥 YouTube Channel: Watch our videos here.

@Sheeproid Sheeproid added the good first issue Good for newcomers label Oct 31, 2023
@Sheeproid
Copy link
Contributor

@v2nek , I'm rephrasing this a bit, please let me know if it's what you meant

Today, the custom_graph_enricher action send a graph image to Slack. This graph image has a title, set by graph_title.
You'd like to use a templating mechanism that uses the alert label, for example if I have a Prometheus alert label named instance: 192.168.81.193:8080 I'll be able to use it $instance

customPlaybooks:
- actions:
  - custom_graph_enricher:
      graph_title: CPU Usage for this nod with instance $instance,
      prometheus_additional_labels: 'cluster: ''cluster-2-test''env: ''prod'''
      prometheus_auth: Basic YWRtaW46cGFzc3dvcmQ=
      prometheus_url: http://prometheus-k8s.monitoring.svc.cluster.local:9090
      prometheus_url_query_string: demo-query=example-data
      promql_query: instance:node_cpu_utilisation:rate5m{job="node-exporter", instance=~"$node_internal_ip:[0-9]+",
        cluster=""} != 0
  triggers:
  - on_prometheus_alert: {}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants