How to configure the URL presented in Alertmanager alerts
Overview/Background
By default, Alertmanager alerts will present the Alertmanager service endpoint as a clickable link to view the alert. In most situations, this link would not be accessible outside of the cluster. Instead, you would want to use the ingress endpoint where Alertmanager is exposed.
Solution
To change the URL presented in Alertmanager alerts to one that is accessible outside of the cluster, you can execute the following steps:
1) Obtain the URL used for Alertmanager ingress:
kubectl get ing prometheus-kubeaddons-prom-alertmanager \ --namespace kubeaddons \ -o jsonpath="{.status.loadBalancer.ingress[0].*}"
2) Using the ingress IP/FQDN from step 1, modify the prometheus values in your cluster.yaml to include the alertmanager.alertmanagerSpec.externalUrl
key, with a value of "https://172.16.75.225/ops/portal/alertmanager"
. For example:
- name: prometheus enabled: true values: | alertmanager: alertmanagerSpec: externalUrl: "https://172.16.75.225/ops/portal/alertmanager"
3) Apply the changes to the addon with `konvoy deploy addons` Alertmanager alerts should now point to the URL for external access into the cluster.