Replies: 2 comments 5 replies
-
Nobody has seen this request so far... Wondering if @paulfantom could take a look at this? |
Beta Was this translation helpful? Give feedback.
5 replies
-
i copied the exact file posted above and didnt work, can i have an updated one pls with gmail smtp? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
In my cluster, I have leveraged the AlertmanagerConfig custom resource https://github.com/prometheus-operator/prometheus-operator/blob/master/Documentation/api.md#alertmanagerconfig, which in my understanding, help us change the currently deployed Alertmanager config files at will.
So, to configure my Sendgrid account to deal with desired email integration (a.k.a. Alertmanager sending e-mail alert notifications), I have created a file named AlertManagerConfigmap.yaml with the following:
apiVersion: monitoring.coreos.com/v1alpha1
kind: AlertmanagerConfig
metadata:
name: example
spec:
receivers:
- name: 'email'
email_configs:
- to: '[email protected]'
from: '[email protected]'
smarthost: smtp.sendgrid.net:587
auth_username: 'apikey'
auth_password: 'XXXXXXXXX'
route:
group_by: ['alertname']
group_wait: 10s
group_interval: 10s
repeat_interval: 10s
receiver: 'email'
Hoping this configuration will add to the existing one after applying it to the cluster.
Now, when I try to apply it, I got this error:
$ kubectl apply -f monitoring-alertmanager-configmap.yaml
error: error validating "monitoring-alertmanager-configmap.yaml": error validating data: [ValidationError(AlertmanagerConfig.metadata): unknown field "route" in io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta, ValidationError(AlertmanagerConfig.metadata): unknown field "spec" in io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta, ValidationError(AlertmanagerConfig): missing required field "spec" in com.coreos.monitoring.v1alpha1.AlertmanagerConfig]; if you choose to ignore these errors, turn validation off with --validate=false
Someone could guide me in this?
Beta Was this translation helpful? Give feedback.
All reactions