RHsyseng / openshift-checks

A collection of scripts to check the health of an OpenShift cluster
53 stars 44 forks source link

[bugfix] Grab alert summary field, proxy fix #92

Closed loganmc10 closed 2 years ago

loganmc10 commented 2 years ago

Many alert rules use the "summary" field instead of the "message" field for an alert description (but not all). I've used jq's // operator, which will select the first non-null value between the two.

I've also moved it to AlertManager's v2 API. Alertmanager has had a v2 API since 0.16.0 (https://github.com/prometheus/alertmanager/releases/tag/v0.16.0). It's mostly the same for this purpose, except the alerts aren't tested under a "data" object anymore

loganmc10 commented 2 years ago

One thing I also added to this check: If the curl returns error code 35, retry with proxy disabled.

We are working with a partner that has given us a jump box with a proxy pre-configured, however that proxy needs to be disabled to access the clusters in the lab. I have a "no_proxy" environment variable set for these clusters, which works for "oc", but curl seems to ignore it

dcritch commented 2 years ago

Don't have a proxy to test, but I did load up a 4.6 cluster to be safe and its fine. Thanks!