Replies: 1 comment
-
|
The issue is that you're placing the Alertmanager configuration under Here's the corrected structure: # Alertmanager config goes under alertmanagerFiles, not serverFiles
alertmanagerFiles:
alertmanager.yml:
global:
resolve_timeout: 5m
route:
receiver: 'slack-notifications'
group_by: ['alertname']
group_wait: 10s
group_interval: 5m
repeat_interval: 1h
receivers:
- name: 'slack-notifications'
slack_configs:
- api_url: 'https://hooks.slack.com/services/XXXXXXXX/YYYYYYYYY/ZZZZZZ'
channel: '#alert-channel'
send_resolved: true
username: 'Prometheus'
text: "{{ .CommonLabels.alertname }}: {{ .CommonAnnotations.description }}"
serverFiles:
prometheus.yml:
scrape_configs:
- job_name: 'prometheus'
static_configs:
- targets:
- localhost:9090
- job_name: 'opencost'
static_configs:
- targets: ['opencost.opencost-exporter:9003']
# Note: when alertmanager.enabled=true (the default), the chart
# automatically injects the alertmanagers block into prometheus.yml
alerting_rules.yml:
groups:
- name: opencost-alerts
rules:
- alert: HighCost
expr: node_total_hourly_cost > 1
for: 1m
labels:
severity: critical
annotations:
description: "The cost is higher than expected for the last 1 minutes"
summary: "Cost is over $1 for the last 1 minutes"A few things to verify:
The |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I'm using this chart:
https://artifacthub.io/packages/helm/prometheus-community/prometheus
In the
values.yaml, I set these serverFiles:But when alert firing in Prometheus UI, there isn't any send log in alertmanager pod. And sure can't receive alert from Slack.
I'm sure the slack webhook is right. Where is wrong?
Beta Was this translation helpful? Give feedback.
All reactions