File tree Expand file tree Collapse file tree
packages/system/monitoring-agents Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ {{- if .Values.alertmanager.enabled }}
2+ apiVersion : apps/v1
3+ kind : Deployment
4+ metadata :
5+ name : alertmanager
6+ labels :
7+ app : alertmanager
8+ spec :
9+ replicas : {{ .Values.alertmanager.replicas }}
10+ selector :
11+ matchLabels :
12+ app : alertmanager
13+ template :
14+ metadata :
15+ labels :
16+ app : alertmanager
17+ spec :
18+ containers :
19+ - name : alertmanager
20+ image : " prom/alertmanager:v0.27.0"
21+ imagePullPolicy : IfNotPresent
22+ resources : {{- toYaml .Values.alertmanager.resources | nindent 12 }}
23+ args :
24+ - --config.file=/etc/alertmanager/alertmanager.yaml
25+ - --storage.path=/alertmanager
26+ - --cluster.listen-address=
27+ ports :
28+ - name : http
29+ containerPort : 9093
30+ protocol : TCP
31+ livenessProbe :
32+ httpGet :
33+ path : /-/healthy
34+ port : http
35+ initialDelaySeconds : 30
36+ periodSeconds : 10
37+ readinessProbe :
38+ httpGet :
39+ path : /-/ready
40+ port : http
41+ initialDelaySeconds : 5
42+ periodSeconds : 10
43+ volumeMounts :
44+ - name : config
45+ mountPath : /etc/alertmanager
46+ - name : storage
47+ mountPath : /alertmanager
48+ volumes :
49+ - name : config
50+ secret :
51+ secretName : alertmanager
52+ - name : storage
53+ emptyDir : {}
54+ {{- end }}
Original file line number Diff line number Diff line change 1+ {{- if .Values.alertmanager.enabled }}
2+ apiVersion : v1
3+ kind : Secret
4+ metadata :
5+ name : alertmanager
6+ labels :
7+ app : alertmanager
8+ type : Opaque
9+ stringData :
10+ alertmanager.yaml : |
11+ global:
12+ smtp_smarthost: 'localhost:587'
13+ smtp_from: 'alertmanager@localhost'
14+ smtp_auth_username: ''
15+ smtp_auth_password: ''
16+ smtp_require_tls: false
17+
18+ route:
19+ group_by: ['alertname']
20+ group_wait: 10s
21+ group_interval: 10s
22+ repeat_interval: 1h
23+ receiver: 'slack'
24+ routes:
25+ - match:
26+ alertname: Watchdog
27+ receiver: 'null'
28+
29+ receivers:
30+ - name: 'null'
31+ - name: 'slack'
32+ slack_configs:
33+ - api_url: {{ .Values.alertmanager.slack.webhookUrl | quote }}
34+ channel: {{ .Values.alertmanager.slack.channel | quote }}
35+ username: {{ .Values.alertmanager.slack.username | quote }}
36+ icon_emoji: {{ .Values.alertmanager.slack.iconEmoji | quote }}
37+ title: '{{`{{ .GroupLabels.alertname }}`}}'
38+ text: '{{`{{ range .Alerts }}{{ .Annotations.summary }} - {{ .Annotations.description }}{{ end }}`}}'
39+ {{- end }}
Original file line number Diff line number Diff line change 1+ {{- if .Values.alertmanager.enabled }}
2+ apiVersion : v1
3+ kind : Service
4+ metadata :
5+ name : alertmanager
6+ labels :
7+ app : alertmanager
8+ spec :
9+ type : ClusterIP
10+ ports :
11+ - port : 9093
12+ targetPort : http
13+ protocol : TCP
14+ name : http
15+ selector :
16+ app : alertmanager
17+ {{- end }}
Original file line number Diff line number Diff line change 1+ {{- if .Values.alertmanager.enabled }}
2+ apiVersion : cozystack.io/v1alpha1
3+ kind : WorkloadMonitor
4+ metadata :
5+ name : alertmanager
6+ spec :
7+ replicas : {{ .Values.alertmanager.replicas }}
8+ minReplicas : 1
9+ kind : monitoring
10+ type : alertmanager
11+ selector :
12+ app : alertmanager
13+ version : {{ $.Chart.Version }}
14+ {{- end }}
Original file line number Diff line number Diff line change 1+ {{- if .Values.alertmanager.enabled }}
2+ apiVersion : operator.victoriametrics.com/v1beta1
3+ kind : VMAlert
4+ metadata :
5+ name : vmalert
6+ spec :
7+ datasource :
8+ url : http://vmselect-shortterm.tenant-root.svc:8481/select/0/prometheus
9+ evaluationInterval : 15s
10+ notifiers :
11+ - url : http://alertmanager:9093
12+ remoteRead :
13+ url : http://vmselect-shortterm.tenant-root.svc:8481/select/0/prometheus
14+ remoteWrite :
15+ url : http://vminsert-shortterm.tenant-root.svc:8480/insert/0/prometheus/api/v1/write
16+ resources : {}
17+ selectAllByDefault : true
18+ {{- end }}
Original file line number Diff line number Diff line change @@ -421,6 +421,22 @@ fluent-bit:
421421 Name modify
422422 Match *
423423 Add cluster root-cluster
424+ alertmanager :
425+ enabled : false
426+ replicas : 1
427+ slack :
428+ webhookUrl : " "
429+ channel : " #alerts"
430+ username : " Alertmanager"
431+ iconEmoji : " :bell:"
432+ resources :
433+ requests :
434+ cpu : 100m
435+ memory : 128Mi
436+ limits :
437+ cpu : 200m
438+ memory : 256Mi
439+
424440scrapeRules :
425441 etcd :
426442 enabled : false
You can’t perform that action at this time.
0 commit comments