Skip to content

Commit

Permalink
Merge pull request #231 from OT-CONTAINER-KIT/prom-alerts
Browse files Browse the repository at this point in the history
Datasource
  • Loading branch information
ashwani-opstree authored Aug 12, 2024
2 parents c9e77e7 + 8f836c8 commit 6066384
Show file tree
Hide file tree
Showing 15 changed files with 1,176 additions and 1,205 deletions.
5 changes: 3 additions & 2 deletions charts/pga/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ apiVersion: v2
name: pga
description: A Helm chart for prometheus, grafana and alertmanager
type: application
version: 1.0.0
appVersion: 1.0.0
version: 1.0.1
appVersion: 1.0.1
maintainers:
- name: ashwani-opstree

Expand All @@ -22,6 +22,7 @@ dependencies:
alias: kube
tags:
- monitoring
condition: kube.enabled

- name: prometheus-adapter
version: 4.10.0
Expand Down
52 changes: 52 additions & 0 deletions charts/pga/alerts/alertmanager/config/alertmanager.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
global:
resolve_timeout: 5m
route:
group_wait: 30s
group_interval: 5m
repeat_interval: 30m
receiver: "null"
group_by:
- job
- alertname
- severity
routes:
- receiver: "null"
match:
alertname: Watchdog
- receiver: "alerts-infra"
group_wait: 10s
continue: true
match_re:
severity: warning|high
channel: slack
team: devops
receivers:
- name: "null"
# - name: "email"
# email_configs:
# - to: ''
# from: ''
# smarthost: ''
# auth_username: ''
# auth_password: ''
# require_tls: yes
# send_resolved: true
- name: "alerts-infra"
slack_configs:
- api_url: 'https://hooks.slack.com/services/'
send_resolved: true
channel: '#alerts-infra'
icon_url: https://avatars3.githubusercontent.com/u/3380462
title: '[{{ .Status | toUpper }}{{ if eq .Status "firing" }}:{{ .Alerts.Firing | len }}{{ end }}] {{ .CommonLabels.alertname }}'
text: >-
{{ range .Alerts }}
*Alert:* {{ .Annotations.description }} - `{{ .Labels.severity }}`
*Description:* {{ .Annotations.description }}
*Graph:* <{{ .GeneratorURL }}|:chart_with_upwards_trend:> *Runbook:* <{{ .Annotations.runbook }}|:spiral_note_pad:>
*Details:*
{{ range .Labels.SortedPairs }} • *{{ .Name }}:* `{{ .Value }}`
{{ end }}
{{ end }}
17 changes: 17 additions & 0 deletions charts/pga/alerts/alertmanager/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
namePrefix: alertmanager-
namespace: monitoring
commonLabels:
app: kube-alertmanager
release: kube
prometheus: kube

generatorOptions:
disableNameSuffixHash: true

secretGenerator:
- name: kube-alertmanager
files:
- config/alertmanager.yaml
type: Opaque
4 changes: 2 additions & 2 deletions charts/pga/grafana/dashboards/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ kind: Kustomization
namespace: monitoring
nameSuffix: -grafana-dashboard

bases:
- opentelmetry-apm
resources:
- opentelemetry-apm
Loading

0 comments on commit 6066384

Please sign in to comment.