Alertmanager handles alerts sent by client applications such as the Prometheus server. It takes care of deduplicating, grouping, and routing them to the correct receiver integration such as email, PagerDuty, or OpsGenie. It also takes care of silencing and inhibition of alerts.
-
Update
data."config.yml"
in alertmanager.ConfigMap.yaml with your Alertmanager configuration. -
Update alertmanager.Deployment.yaml with the URL to your Alertmanager instance.
ALERT_MANAGER_URL="https://alertmanager.example.com" # update this url AD=configure/prometheus/alertmanager/alertmanager.Deployment.yaml cat $AD | yj | jq "(.spec.template.spec.containers[] | select(.name == \"alertmanager\") | .args) |= (. + [\"--web.external-url=$ALERT_MANAGER_URL\"] | unique)" | jy -o $AD
-
Update prometheus.Deployment.yaml with the URL to your Alertmanager instance.
ALERT_MANAGER_URL="https://alertmanager.example.com" # update this url PD=base/prometheus/prometheus.Deployment.yaml cat $PD | yj | jq "(.spec.template.spec.containers[] | select(.name == \"prometheus\") | .args) |= (. + [\"--web.external-url=$ALERT_MANAGER_URL\"] | unique)" | jy -o $PD
-
Apply the Alertmanager resources to your cluster.
kubectl apply --prune -l deploy=alertmanager -f configure/prometheus/alertmanager --recursive
-
Apply the Prometheus resources to your cluster.
kubectl apply --prune -l deploy=sourcegraph -f base/prometheus --recursive