All Questions
Tagged with prometheus-alertmanager go-templates
9
questions
1
vote
0
answers
103
views
Alertmanager template dynamic url
I'm trying to create a template that will dynamically pass the correct URL to the Slack receiver action button
In my rules, I have dashboard_url annotations, but not for all rules, only for specific
...
0
votes
0
answers
240
views
How to add custom annotations based on labels with alertmanager templates?
I have an Alertmanager, sending alerts to an Alerta.
Alerts sent contains annotations field with only description, and a tons of labels.
What I would like to do is create a template for Alertmanager ...
0
votes
1
answer
428
views
How can i use arithmetic operations in the description of a Prometheus Alert?
I have an alert in Prometheus that fires if a SSL Certificate expires 29 days from now.
The Alert works perfectly fine. The problem is the Value it returns is not in days.
The query i use is as follow:...
0
votes
0
answers
253
views
Prometheus Alertmanager notification template periodical buggy output
I'm using kube-prometheus-stack alertmanager (0.25) notification template to send alerts to opsgenie. Grouping is disabled for alertmanager. All alerts have following label: "k8sCluster: dev"...
3
votes
1
answer
1k
views
Go Template if condition
how can i combine and and eq/ne functions together?
I wrote this snippet
{{ define "opsgenie.default.tmpl" }}
<font size="+0"><b>{{.CommonLabels.alertname }}</b>...
2
votes
2
answers
2k
views
How to remove labels in Prometheus Alert template?
I found a template for Prometheus Alert Manager for alerts, but I receive many unnecessary labels in notification. How to remove labels in template? This code is responsible for labels (look below). I ...
2
votes
1
answer
310
views
Dynamically process template map values
I have annotations object like this:
Annotations: map[string]string{
"common": "Some GPM consistency checkers have failed.",
"t_0": "Title1",
...
0
votes
1
answer
1k
views
How to discard alert summary when alert status is RESOLVED in Prometheus Alertmanager?
Consider a simple alert:
- alert: SomeAlert
expr: SomeExpression > SomeValue
labels:
severity: notification
slack: SomeSlackChannel
annotations:
...
1
vote
1
answer
2k
views
Prometheus Slack alert with FAQ url
I have a Prometheus alert like this:
- alert: NginxCrashLoop
annotations:
description: Nginx at {{ $labels.pod }} is in Crash Loop
identifier: '{{ $labels.node }}'
runbook_url: https://...