manifests: add Alertmanager manifests and discovery
The latest version of the Prometheus Operator requires Prometheus >=v1.4.0 for the Alertmanger discovery feature.
This commit is contained in:
18
manifests/alertmanager/alertmanager-config.yaml
Normal file
18
manifests/alertmanager/alertmanager-config.yaml
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: ConfigMap
|
||||||
|
metadata:
|
||||||
|
name: alertmanager-main
|
||||||
|
data:
|
||||||
|
alertmanager.yaml: |-
|
||||||
|
global:
|
||||||
|
resolve_timeout: 5m
|
||||||
|
route:
|
||||||
|
group_by: ['job']
|
||||||
|
group_wait: 30s
|
||||||
|
group_interval: 5m
|
||||||
|
repeat_interval: 12h
|
||||||
|
receiver: 'webhook'
|
||||||
|
receivers:
|
||||||
|
- name: 'webhook'
|
||||||
|
webhook_configs:
|
||||||
|
- url: 'http://alertmanagerwh:30500/'
|
14
manifests/alertmanager/alertmanager-service.yaml
Normal file
14
manifests/alertmanager/alertmanager-service.yaml
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: alertmanager-main
|
||||||
|
spec:
|
||||||
|
type: NodePort
|
||||||
|
ports:
|
||||||
|
- name: web
|
||||||
|
nodePort: 30903
|
||||||
|
port: 9093
|
||||||
|
protocol: TCP
|
||||||
|
targetPort: web
|
||||||
|
selector:
|
||||||
|
alertmanager: alertmanager-main
|
9
manifests/alertmanager/alertmanager.yaml
Normal file
9
manifests/alertmanager/alertmanager.yaml
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
apiVersion: "monitoring.coreos.com/v1alpha1"
|
||||||
|
kind: "Alertmanager"
|
||||||
|
metadata:
|
||||||
|
name: "alertmanager-main"
|
||||||
|
labels:
|
||||||
|
alertmanager: "main"
|
||||||
|
spec:
|
||||||
|
replicas: 3
|
||||||
|
version: v0.5.1
|
@@ -6,7 +6,7 @@ metadata:
|
|||||||
labels:
|
labels:
|
||||||
prometheus: frontend
|
prometheus: frontend
|
||||||
spec:
|
spec:
|
||||||
version: v1.3.0
|
version: v1.4.1
|
||||||
serviceMonitors:
|
serviceMonitors:
|
||||||
- selector:
|
- selector:
|
||||||
matchLabels:
|
matchLabels:
|
||||||
@@ -18,3 +18,8 @@ spec:
|
|||||||
# production use. This value is mainly meant for demonstration/testing
|
# production use. This value is mainly meant for demonstration/testing
|
||||||
# purposes.
|
# purposes.
|
||||||
memory: 400Mi
|
memory: 400Mi
|
||||||
|
alerting:
|
||||||
|
alertmanagers:
|
||||||
|
- namespace: monitoring
|
||||||
|
name: alertmanager-main
|
||||||
|
port: web
|
||||||
|
@@ -5,7 +5,7 @@ metadata:
|
|||||||
labels:
|
labels:
|
||||||
prometheus: k8s
|
prometheus: k8s
|
||||||
spec:
|
spec:
|
||||||
version: v1.3.0
|
version: v1.4.1
|
||||||
resources:
|
resources:
|
||||||
requests:
|
requests:
|
||||||
# 2Gi is default, but won't schedule if you don't have a node with >2Gi
|
# 2Gi is default, but won't schedule if you don't have a node with >2Gi
|
||||||
@@ -13,3 +13,8 @@ spec:
|
|||||||
# production use. This value is mainly meant for demonstration/testing
|
# production use. This value is mainly meant for demonstration/testing
|
||||||
# purposes.
|
# purposes.
|
||||||
memory: 400Mi
|
memory: 400Mi
|
||||||
|
alerting:
|
||||||
|
alertmanagers:
|
||||||
|
- namespace: monitoring
|
||||||
|
name: alertmanager-main
|
||||||
|
port: web
|
||||||
|
Reference in New Issue
Block a user