57 lines
1.1 KiB
YAML
57 lines
1.1 KiB
YAML
apiVersion: monitoring.coreos.com/v1
|
|
kind: Alertmanager
|
|
metadata:
|
|
name: alertmanager
|
|
namespace: monitoring
|
|
spec:
|
|
replicas: 1
|
|
alertmanagerConfigSelector:
|
|
matchLabels:
|
|
alertmanagerConfig: example
|
|
---
|
|
apiVersion: v1
|
|
kind: Service
|
|
metadata:
|
|
name: alertmanager
|
|
namespace: monitoring
|
|
spec:
|
|
ipFamilies:
|
|
- IPv6
|
|
- IPv4
|
|
ipFamilyPolicy: PreferDualStack
|
|
ports:
|
|
- port: 9093
|
|
protocol: TCP
|
|
targetPort: web
|
|
name: web
|
|
selector:
|
|
alertmanager: alertmanager
|
|
#sessionAffinity: None
|
|
type: ClusterIP
|
|
---
|
|
apiVersion: monitoring.coreos.com/v1alpha1
|
|
kind: AlertmanagerConfig
|
|
metadata:
|
|
name: config
|
|
namespace: monitoring
|
|
labels:
|
|
alertmanagerConfig: example
|
|
spec:
|
|
route:
|
|
groupBy: ['job']
|
|
groupWait: 30s
|
|
groupInterval: 5m
|
|
repeatInterval: 12h
|
|
receiver: 'gmail'
|
|
receivers:
|
|
- name: 'gmail'
|
|
emailConfigs:
|
|
- sendResolved: true
|
|
to: "thrawn235@gmail.com"
|
|
from: "alertmanager.undercloud.cf"
|
|
smarthost: smtp.gmail.com:587
|
|
authUsername: thrawn235@gmail.com
|
|
authIdentity: thrawn235@gmail.com
|
|
authPassword:
|
|
name: gmail-auth
|
|
key: password |