diff --git a/resources/grafana/generated/dashboards/rhacs-cluster-overview-configmap.yaml b/resources/grafana/generated/dashboards/rhacs-cluster-overview-configmap.yaml index 8c10d07c..bfa11a11 100644 --- a/resources/grafana/generated/dashboards/rhacs-cluster-overview-configmap.yaml +++ b/resources/grafana/generated/dashboards/rhacs-cluster-overview-configmap.yaml @@ -29,6 +29,28 @@ data: "type": "dashboard" }, "type": "dashboard" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "enable": true, + "iconColor": "purple", + "expr": "count (count by (git_version) (label_replace(kubernetes_build_info{job!~\"kube-dns|coredns\"}, \"git_version\", \"$1\", \"git_version\", \"(v[0-9]*.[0-9]*).*\"))) > 1", + "name": "Kubernetes Upgrade", + "textFormat": "Kubernetes Upgrade" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "enable": true, + "iconColor": "red", + "expr": "count (count by (gitVersion) (openshift_apiserver_build_info)) > 1", + "name": "OpenShift Upgrade", + "textFormat": "OpenShift Upgrade" } ] }, diff --git a/resources/grafana/generated/dashboards/rhacs-cluster-overview-dashboard.yaml b/resources/grafana/generated/dashboards/rhacs-cluster-overview-dashboard.yaml index e7e3091e..6ea35bf0 100644 --- a/resources/grafana/generated/dashboards/rhacs-cluster-overview-dashboard.yaml +++ b/resources/grafana/generated/dashboards/rhacs-cluster-overview-dashboard.yaml @@ -29,6 +29,28 @@ spec: "type": "dashboard" }, "type": "dashboard" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "enable": true, + "iconColor": "purple", + "expr": "count (count by (git_version) (label_replace(kubernetes_build_info{job!~\"kube-dns|coredns\"}, \"git_version\", \"$1\", \"git_version\", \"(v[0-9]*.[0-9]*).*\"))) > 1", + "name": "Kubernetes Upgrade", + "textFormat": "Kubernetes Upgrade" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "enable": true, + "iconColor": "red", + "expr": "count (count by (gitVersion) (openshift_apiserver_build_info)) > 1", + "name": "OpenShift Upgrade", + "textFormat": "OpenShift Upgrade" } ] }, diff --git a/resources/grafana/sources/rhacs-cluster-overview.json b/resources/grafana/sources/rhacs-cluster-overview.json index 0841eb42..8969a623 100644 --- a/resources/grafana/sources/rhacs-cluster-overview.json +++ b/resources/grafana/sources/rhacs-cluster-overview.json @@ -18,6 +18,28 @@ "type": "dashboard" }, "type": "dashboard" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "enable": true, + "iconColor": "purple", + "expr": "count (count by (git_version) (label_replace(kubernetes_build_info{job!~\"kube-dns|coredns\"}, \"git_version\", \"$1\", \"git_version\", \"(v[0-9]*.[0-9]*).*\"))) > 1", + "name": "Kubernetes Upgrade", + "textFormat": "Kubernetes Upgrade" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "enable": true, + "iconColor": "red", + "expr": "count (count by (gitVersion) (openshift_apiserver_build_info)) > 1", + "name": "OpenShift Upgrade", + "textFormat": "OpenShift Upgrade" } ] }, diff --git a/resources/prometheus/federation-config-base.yaml b/resources/prometheus/federation-config-base.yaml index 33a70c2f..60b16a5b 100644 --- a/resources/prometheus/federation-config-base.yaml +++ b/resources/prometheus/federation-config-base.yaml @@ -3,3 +3,4 @@ match[]: # This is an example. - up{job!~"central|scanner"} + - openshift_apiserver_build_info diff --git a/resources/prometheus/federation-config.yaml b/resources/prometheus/federation-config.yaml index c63da907..11b05d7c 100644 --- a/resources/prometheus/federation-config.yaml +++ b/resources/prometheus/federation-config.yaml @@ -154,6 +154,7 @@ match[]: - node_netstat_Tcp_RetransSegs{job!~"central|scanner"} - node_quantile:kubelet_pleg_relist_duration_seconds:histogram_quantile{job!~"central|scanner"} - obs_operator:prometheus_remote_storage_succeeded_samples:ratio_rate1h{job!~"central|scanner"} + - openshift_apiserver_build_info - process_cpu_seconds_total{job!~"central|scanner"} - process_resident_memory_bytes{job!~"central|scanner"} - prometheus_remote_storage_samples_failed_total{job!~"central|scanner"} diff --git a/scripts/generate-federate-match.sh b/scripts/generate-federate-match.sh index f6c57feb..cc5a29cc 100755 --- a/scripts/generate-federate-match.sh +++ b/scripts/generate-federate-match.sh @@ -1,7 +1,11 @@ #!/usr/bin/env bash set -eou pipefail -shopt -s inherit_errexit + +# only if not OSX +if [[ $(uname) != "Darwin" ]]; then + shopt -s inherit_errexit +fi function log() { echo "$@" >&2