From ec9dbcbd371a587819a119acafea1ce84bdcc835 Mon Sep 17 00:00:00 2001 From: Simon Pasquier Date: Fri, 24 Jan 2020 15:50:33 +0100 Subject: [PATCH 1/3] Update etcd monitoring procedure --- .../configuring-etcd-monitoring.adoc | 70 ++++--------------- ...figuring-openshift-cluster-monitoring.adoc | 6 ++ 2 files changed, 18 insertions(+), 58 deletions(-) diff --git a/install_config/monitoring/configuring-etcd-monitoring.adoc b/install_config/monitoring/configuring-etcd-monitoring.adoc index b1860ddd0fb9..daacc7f49b59 100644 --- a/install_config/monitoring/configuring-etcd-monitoring.adoc +++ b/install_config/monitoring/configuring-etcd-monitoring.adoc @@ -7,7 +7,18 @@ If the `etcd` service does not run correctly, successful operation of the whole {product-title} cluster is in danger. Therefore, it is reasonable to configure monitoring of `etcd`. -Follow these steps to configure `etcd` monitoring: +* To enable the etcd monitoring, set this variable to `true` in the Ansible inventory file: ++ +`openshift_cluster_monitoring_operator_etcd_enabled` + +* If you run `etcd` on separate hosts, set this variable in the Ansible inventory file to specify the nodes using IP addresses: ++ +`openshift_cluster_monitoring_operator_etcd_hosts` + ++ +If the IP addresses for `etcd` nodes change, you must update this list. + +Follow these steps to complete the configuration of `etcd` monitoring: .Procedure @@ -31,63 +42,6 @@ prometheus-k8s-1 0/4 ContainerCreating 0 prometheus-operator-6c9fddd47f-9jfgk 1/1 Running 0 36m ---- -. Open the configuration file for the cluster monitoring stack: -+ ----- -$ oc -n openshift-monitoring edit configmap cluster-monitoring-config ----- - -. Under `config.yaml: |+`, add the `etcd` section. - -.. If you run `etcd` in static pods on your master nodes, you can specify the `etcd` nodes using the selector: -+ ----- -... -data: - config.yaml: |+ - ... - etcd: - targets: - selector: - openshift.io/component: etcd - openshift.io/control-plane: "true" ----- - -.. If you run `etcd` on separate hosts, you need to specify the nodes using IP addresses: -+ ----- -... -data: - config.yaml: |+ - ... - etcd: - targets: - ips: - - "127.0.0.1" - - "127.0.0.2" - - "127.0.0.3" ----- -+ -If the IP addresses for `etcd` nodes change, you must update this list. - -. Verify that the `etcd` service monitor is now running: -+ ----- -$ oc -n openshift-monitoring get servicemonitor -NAME AGE -alertmanager 35m -etcd 1m <1> -kube-apiserver 36m -kube-controllers 36m -kube-state-metrics 34m -kubelet 36m -node-exporter 34m -prometheus 36m -prometheus-operator 37m ----- -<1> The `etcd` service monitor. -+ -It might take up to a minute for the `etcd` service monitor to start. . Now you can navigate to the web interface to see more information about the status of `etcd` monitoring. diff --git a/install_config/monitoring/configuring-openshift-cluster-monitoring.adoc b/install_config/monitoring/configuring-openshift-cluster-monitoring.adoc index 0ff43bdd45d0..7f65fb5bbbe4 100644 --- a/install_config/monitoring/configuring-openshift-cluster-monitoring.adoc +++ b/install_config/monitoring/configuring-openshift-cluster-monitoring.adoc @@ -40,6 +40,12 @@ The {product-title} Ansible `openshift_cluster_monitoring_operator` role configu |`openshift_cluster_monitoring_operator_alertmanager_storage_class_name` | If you enabled the `openshift_cluster_monitoring_operator_alertmanager_storage_enabled` option, set a specific StorageClass to ensure that pods are configured to use the `PVC` with that `storageclass`. Defaults to `none`, which applies the default storage class name. +|`openshift_cluster_monitoring_operator_etcd_enabled` +| Enable `etcd` monitoring. This variable is set to `false` by default. + +|`openshift_cluster_monitoring_operator_etcd_hosts` +| The list of IP addresses of the `etcd` hosts when `etcd` runs on separate nodes. + |=== [[monitoring-prerequisites]] From bbf5b7b03e31505c5865285c0eda992659aee19b Mon Sep 17 00:00:00 2001 From: Maxim Svistunov Date: Thu, 30 Jan 2020 14:38:43 +0100 Subject: [PATCH 2/3] Restructure the etcd monitoring configuration procedure --- .../configuring-etcd-monitoring.adoc | 22 +++++++++---------- 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/install_config/monitoring/configuring-etcd-monitoring.adoc b/install_config/monitoring/configuring-etcd-monitoring.adoc index daacc7f49b59..82717646450f 100644 --- a/install_config/monitoring/configuring-etcd-monitoring.adoc +++ b/install_config/monitoring/configuring-etcd-monitoring.adoc @@ -7,18 +7,7 @@ If the `etcd` service does not run correctly, successful operation of the whole {product-title} cluster is in danger. Therefore, it is reasonable to configure monitoring of `etcd`. -* To enable the etcd monitoring, set this variable to `true` in the Ansible inventory file: -+ -`openshift_cluster_monitoring_operator_etcd_enabled` - -* If you run `etcd` on separate hosts, set this variable in the Ansible inventory file to specify the nodes using IP addresses: -+ -`openshift_cluster_monitoring_operator_etcd_hosts` - -+ -If the IP addresses for `etcd` nodes change, you must update this list. - -Follow these steps to complete the configuration of `etcd` monitoring: +To enable the `etcd` monitoring: .Procedure @@ -42,6 +31,15 @@ prometheus-k8s-1 0/4 ContainerCreating 0 prometheus-operator-6c9fddd47f-9jfgk 1/1 Running 0 36m ---- +. Set this variable to `true` in the Ansible inventory file: ++ +`openshift_cluster_monitoring_operator_etcd_enabled` + +. If you run `etcd` on separate hosts, set this variable in the Ansible inventory file to specify the nodes using IP addresses: ++ +`openshift_cluster_monitoring_operator_etcd_hosts` ++ +If the IP addresses for `etcd` nodes change, you must update this list. . Now you can navigate to the web interface to see more information about the status of `etcd` monitoring. From 9bbfadf1d284416b0a21a524e28461ef183e1c75 Mon Sep 17 00:00:00 2001 From: Simon Pasquier Date: Wed, 22 Apr 2020 17:14:41 +0200 Subject: [PATCH 3/3] Fix 'oc get pods' output --- install_config/monitoring/configuring-etcd-monitoring.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install_config/monitoring/configuring-etcd-monitoring.adoc b/install_config/monitoring/configuring-etcd-monitoring.adoc index 82717646450f..5c2a29467e8b 100644 --- a/install_config/monitoring/configuring-etcd-monitoring.adoc +++ b/install_config/monitoring/configuring-etcd-monitoring.adoc @@ -27,7 +27,7 @@ node-exporter-b2mrp 2/2 Running 0 node-exporter-fd52p 2/2 Running 0 33m node-exporter-hfqgv 2/2 Running 0 33m prometheus-k8s-0 4/4 Running 1 35m -prometheus-k8s-1 0/4 ContainerCreating 0 21s +prometheus-k8s-1 4/4 Runinng 0 35m prometheus-operator-6c9fddd47f-9jfgk 1/1 Running 0 36m ----