diff --git a/docs/modules/ROOT/partials/install/finalize_part1.adoc b/docs/modules/ROOT/partials/install/finalize_part1.adoc index 2dae4c7e..96904b36 100644 --- a/docs/modules/ROOT/partials/install/finalize_part1.adoc +++ b/docs/modules/ROOT/partials/install/finalize_part1.adoc @@ -109,3 +109,33 @@ oc whoami # should output system:serviceaccount:appuio-emergency-credentials-con ---- kubectl -n openshift-config patch cm admin-kubeconfig-client-ca --type=merge -p '{"data": {"ca-bundle.crt": ""}}' ---- + +=== Enable Opsgenie alerting + +. Create the standard silence for alerts that don't have the `syn` label ++ +[source,bash] +---- +oc --as cluster-admin -n openshift-monitoring create job --from=cronjob/silence silence-manual +oc wait -n openshift-monitoring --for=condition=complete job/silence-manual +oc --as cluster-admin -n openshift-monitoring delete job/silence-manual +---- + +. Check the remaining active alerts and address them where neccessary ++ +[source,bash] +---- +kubectl --as=cluster-admin -n openshift-monitoring exec sts/alertmanager-main -- \ + amtool --alertmanager.url=http://localhost:9093 alert --active +---- + +. Remove the "no-opsgenie" class from the cluster's configuration ++ +[source,bash] +---- +pushd "inventory/classes/${TENANT_ID}/" +yq eval -i 'del(.classes[] | select(. == "*.no-opsgenie"))' ${CLUSTER_ID}.yml +git commit -a -m "Enable opsgenie alerting on cluster ${CLUSTER_ID}" +git push +popd +---- diff --git a/docs/modules/ROOT/partials/install/prepare-syn-config.adoc b/docs/modules/ROOT/partials/install/prepare-syn-config.adoc index bc73db0d..5a45a509 100644 --- a/docs/modules/ROOT/partials/install/prepare-syn-config.adoc +++ b/docs/modules/ROOT/partials/install/prepare-syn-config.adoc @@ -14,6 +14,13 @@ if ls openshift4.y*ml 1>/dev/null 2>&1; then fi ---- +. Include no-opsgenie class to prevent monitoring noise during cluster setup ++ +[source,bash] +---- +yq eval -i '.classes += "global.distribution.openshift4.no-opsgenie"' ${CLUSTER_ID}.yml; +---- + . Update cluster config + [source,bash,subs="attributes+"]