From f8228c39b11fb283b6dc6908da359240db45a66e Mon Sep 17 00:00:00 2001 From: Maxim Svistunov Date: Fri, 20 Dec 2019 05:51:26 +0100 Subject: [PATCH 01/16] Add the user workload monitoring documentation --- _topic_map.yml | 2 + images/monitoring-metrics-developer.png | Bin 0 -> 42157 bytes ...oring-accessing-user-workload-metrics.adoc | 26 +++++ ...toring-deploying-a-sample-application.adoc | 99 ++++++++++++++++++ ...ing-enabling-user-workload-monitoring.adoc | 40 +++++++ ...ring-examining-metrics-as-a-developer.adoc | 24 +++++ ...ing-granting-a-user-access-to-metrics.adoc | 21 ++++ .../examining-cluster-metrics.adoc | 1 + monitoring/user-workload-monitoring.adoc | 17 +++ 9 files changed, 230 insertions(+) create mode 100644 images/monitoring-metrics-developer.png create mode 100644 modules/monitoring-accessing-user-workload-metrics.adoc create mode 100644 modules/monitoring-deploying-a-sample-application.adoc create mode 100644 modules/monitoring-enabling-user-workload-monitoring.adoc create mode 100644 modules/monitoring-examining-metrics-as-a-developer.adoc create mode 100644 modules/monitoring-granting-a-user-access-to-metrics.adoc create mode 100644 monitoring/user-workload-monitoring.adoc diff --git a/_topic_map.yml b/_topic_map.yml index 14d1107a8813..16f0933b3ecd 100644 --- a/_topic_map.yml +++ b/_topic_map.yml @@ -988,6 +988,8 @@ Topics: File: examining-cluster-metrics - Name: Accessing Prometheus, Alertmanager, and Grafana File: prometheus-alertmanager-and-grafana +- Name: User workload monitoring + File: user-workload-monitoring - Name: Exposing custom application metrics for autoscaling File: exposing-custom-application-metrics-for-autoscaling --- diff --git a/images/monitoring-metrics-developer.png b/images/monitoring-metrics-developer.png new file mode 100644 index 0000000000000000000000000000000000000000..cbd0abaa88c00bf895b73373ce9280ab3d474656 GIT binary patch literal 42157 zcmdqJcT`i|*FT5_cr1tw5EM`Wk={XiQA+5&Lr{8`E?q@L>4x5s5+D#Fy@seffOIJV z=}7NL2_+Di6a2pO&ibvHe`d{kXV%36_~Ue6O@dwcuFr$_hIWb6BHlRnGm;IUgmC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nT_Hllv1WjJ%!^wg6Ue zm;^=&L%q})t}|*+AxQ0RK_%PAT}4UIhQ zKw(#L6oaBbnDsY1r~K~9;~#5r$$Qp!PrdH456SQ;V6dFecG{+pLtm$5>k#t!we4=n zjD>wQU6XTIwZdTFRceyfZV#iI-$M-E5uIE8b~BA@*7psonSGDBtwV8H^NZ$z@dYzC zNsr>E>+5#{ysD%|ZqEomfAeR{Z}EvEzn)51A)SIs?Nu5}1|6mB)7^e|q7rH=-*(iW z2xm;&UfMX((9lBqdenp8?qi(dR}(YXq(sekLdiqgv`HI`M7dx_TmnPf15+KtJv+|w zwt9}?+IjWYtY&kcnS|7GJKPe&r=o?=MgWYG@9Vm>is{`Ut=!&!;!>++Cu&OF-n(mF zUVP}(HNIT^p4UGYFE-t=boa5ZpRUbdo!-2mu-pIjX7}t@A8sGCnmS?WOJI4YrT4n+ zw}NN)_qZv&TRktE7f%;q2yszMPfstt`f6VY(*fCsHzqop@8t(BYXBZ8@i2j5NAbT0 zHC8=JAp-8|Y_Dfps&Dxg@X7ae^X$c2&!mZJhwKW>WuCL;%TB9LlDoH`c|O_5|9QD( zgSC5Q3}~YH9e92?VNT1IPyCDD_6Dvl za4pYpCyZ(Jt<3K`*npQ2y__qWuED_&5^x82)gv&&C^Fr@Q}6yJ{l`q6oBg+rG6Hq= zS%X^PK#)LMTMFLfdaAWzmaHp7vJ^vsEI7qaSv}nQBMWM|MMR=~V@F9SfK z{Hx$>q-@vO1qwS-uddEpKi#VO<;!oOnrsYH7$I7B3%<26T{Ks{6{t%Lbj=8$J= ns88A6q{oD~=h&irQ<-nuVu{_S(1I*`HB)z4*}Q$iB}74u&( literal 0 HcmV?d00001 diff --git a/modules/monitoring-accessing-user-workload-metrics.adoc b/modules/monitoring-accessing-user-workload-metrics.adoc new file mode 100644 index 000000000000..542e59b253ea --- /dev/null +++ b/modules/monitoring-accessing-user-workload-metrics.adoc @@ -0,0 +1,26 @@ +// Module included in the following assemblies: +// +// * monitoring/user-workload-monitoring.adoc + +[id="accessing-user-workload-metrics_{context}"] += Accessing user workload metrics + +Once you have enabled user workload monitoring, deployed the workload, and, optionally, gave additional view permissions, you can access the custom metrics as the cluster administrator, as a developer, or as another user with permissions. + +.Prerequisites + +* You need to have deployed the workload that you want to monitor, such as an application or a service. This example uses the application described in xref:../monitoring/user-workload-monitoring.adoc#deploying-a-sample-application[Deploying a sample application]. +* You need to have user workload monitoring enabled. +* If accessing metrics as an arbitrary user, the user needs to have the permissions as described in xref:../modules/monitoring-granting-a-user-access-to-metrics.adoc[Granting a user access to metrics]. + +.Procedure + +. Access the Prometheus web interface: ++ +* To access the metrics as a cluster administrator, go to the OpenShift Container Platform web console, switch to the Administrator Perspective, and click *Monitoring* -> *Metrics*. +* To access the metrics as a developer or a user with permissions, go to the OpenShift Container Platform web console, switch to the Developer Perspective, then click *Advanced* -> *Metrics*. Select the project where the user workload resides. +. Use the PromQL interface to run queries for user workload metrics. This works the same as with cluster metrics queries. + +.Additional resources + +* See the xref:../monitoring/cluster-monitoring/examining-cluster-metrics.adoc#examining-cluster-metrics[section on using the PromQL interface]. diff --git a/modules/monitoring-deploying-a-sample-application.adoc b/modules/monitoring-deploying-a-sample-application.adoc new file mode 100644 index 000000000000..b9c74a28e87e --- /dev/null +++ b/modules/monitoring-deploying-a-sample-application.adoc @@ -0,0 +1,99 @@ +// Module included in the following assemblies: +// +// * monitoring/user-workload-monitoring.adoc + +[id="deploying-a-sample-application_{context}"] += Deploying a sample application + +To test user workload monitoring, you can deploy a sample application. + +.Procedure + +. Create a YAML file for the application configuration. In this example, it is called `prometheus-example-app.yaml`. + +. Fill the file with the configuration for deploying the application: ++ +[source,yaml] +---- +apiVersion: v1 +kind: Namespace +metadata: + name: ns1 +--- +apiVersion: extensions/v1beta1 +kind: Deployment +metadata: + labels: + app: prometheus-example-app + name: prometheus-example-app + namespace: ns1 +spec: + replicas: 1 + selector: + matchLabels: + app: prometheus-example-app + template: + metadata: + labels: + app: prometheus-example-app + spec: + containers: + - image: quay.io/brancz/prometheus-example-app:v0.1.0 + imagePullPolicy: IfNotPresent + name: prometheus-example-app +--- +apiVersion: v1 +kind: Service +metadata: + labels: + app: prometheus-example-app + name: prometheus-example-app + namespace: ns1 +spec: + ports: + - port: 8080 + protocol: TCP + targetPort: 8080 + name: web + selector: + app: prometheus-example-app + type: ClusterIP +--- +apiVersion: monitoring.coreos.com/v1 +kind: ServiceMonitor +metadata: + labels: + k8s-app: prometheus-example-monitor + name: prometheus-example-monitor + namespace: ns1 +spec: + endpoints: + - interval: 30s + port: web + scheme: http + selector: + matchLabels: + app: prometheus-example-app +---- ++ +This configuration deploys an application named `prometheus-example-app` in the `ns1` namespace. This application exposes the custom `version` metric. + +. Apply the configuration file to the cluster: ++ +---- +$ oc apply -f prometheus-example-app.yaml +---- ++ +It will take some time to deploy the application. + +. You can check that the application is running and exposing metrics: ++ +---- +$ oc -n ns1 get pod +NAME READY STATUS RESTARTS AGE +prometheus-example-app-7857545cb7-sbgwq 1/1 Running 0 81m + +$ oc -n ns1 get servicemonitor +NAME AGE +prometheus-example-monitor 81m +---- diff --git a/modules/monitoring-enabling-user-workload-monitoring.adoc b/modules/monitoring-enabling-user-workload-monitoring.adoc new file mode 100644 index 000000000000..80fa5fd5d63a --- /dev/null +++ b/modules/monitoring-enabling-user-workload-monitoring.adoc @@ -0,0 +1,40 @@ +// Module included in the following assemblies: +// +// * monitoring/user-workload-monitoring.adoc + +[id="enabling-user-workload-monitoring_{context}"] += Enabling user workload monitoring + +You can enable user workload monitoring using the cluster monitoring ConfigMap. + +.Prerequisites + +* Make sure you have the `cluster-monitoring-config` ConfigMap object with the `data/config.yaml` section. + +.Procedure + +. Start editing the `cluster-monitoring-config` ConfigMap: ++ +---- +$ oc -n openshift-monitoring edit configmap cluster-monitoring-config +---- + +. Set the `techPreviewUserWorkload` setting to `true` under `data/config.yaml`: ++ +---- +apiVersion: v1 +kind: ConfigMap +metadata: + name: cluster-monitoring-config + namespace: openshift-monitoring +data: + config.yaml: | + techPreviewUserWorkload: + enabled: true +---- + +. Save the file to apply the changes. The user workload monitoring is enabled automatically. + +.Additional resources + +* See xref:../monitoring/cluster-monitoring/configuring-the-monitoring-stack.adoc#configuring-the-monitoring-stack[Configuring the monitoring stack] to learn how to create `cluster-monitoring-config`. diff --git a/modules/monitoring-examining-metrics-as-a-developer.adoc b/modules/monitoring-examining-metrics-as-a-developer.adoc new file mode 100644 index 000000000000..d70a92553a1a --- /dev/null +++ b/modules/monitoring-examining-metrics-as-a-developer.adoc @@ -0,0 +1,24 @@ +// Module included in the following assemblies: +// +// * monitoring/cluster-monitoring/examining-cluster-metrics.adoc + +[id="examining-metrics-as-a-developer_{context}"] += Examining metrics as a developer + +You might enable user workload monitoring for an application or service in a project. In that case, a developer of that project can examine the exposed custom metrics using the Developer Perspective in the Web console. + +:FeatureName: Examining metrics using the Developer Perspective +include::modules/technology-preview.adoc[leveloffset=+0] + +.Procedure + +. Open the {product-title} Web console, switch to the Developer Perspective, and navigate to the *Advanced* -> *Metrics* page. Select the project where the user workload resides. ++ +image::monitoring-metrics-developer.png[] + +. Now you can work with custom metrics in the same way as with cluster metrics. + +.Additional resources + +See the xref:../monitoring/user-workload-monitoring.adoc#user-workload-monitoring[User workload monitoring documentation]. + diff --git a/modules/monitoring-granting-a-user-access-to-metrics.adoc b/modules/monitoring-granting-a-user-access-to-metrics.adoc new file mode 100644 index 000000000000..8cc269e93faf --- /dev/null +++ b/modules/monitoring-granting-a-user-access-to-metrics.adoc @@ -0,0 +1,21 @@ +// Module included in the following assemblies: +// +// * monitoring/user-workload-monitoring.adoc + +[id="granting-a-user-access-to-metrics_{context}"] += Granting a user access to metrics + +By default, only cluster administrator users have access to user workload metrics. Using the soft tenancy feature, you can also grant metrics access to an arbitrary user, who only has access to a particular project. + +.Prerequisites + +* You need to have deployed the workload that you want to monitor, such as an application or a service. This example uses the application described in xref:../monitoring/user-workload-monitoring.adoc#deploying-a-sample-application[Deploying a sample application]. +* You need to have user workload monitoring enabled. +* You need to have a user created. For the sake of an example, you can create the `johnsmith` user by running `oc create user johnsmith`. + +.Procedure + +. In the Web console, navigate to *User Management* -> *Role Bindings* -> *Create Binding*. +. In the *Role Name* field, enter `cluster-monitoring-view`. +. In the *Subject Name* enter name of the user, for example `johnsmith`. +. Confirm the role binding. Now the user has been assigned the `cluster-monitoring-view` role, which allows him to access the metrics. diff --git a/monitoring/cluster-monitoring/examining-cluster-metrics.adoc b/monitoring/cluster-monitoring/examining-cluster-metrics.adoc index 9fe6461bd17b..cd5dfe4e1483 100644 --- a/monitoring/cluster-monitoring/examining-cluster-metrics.adoc +++ b/monitoring/cluster-monitoring/examining-cluster-metrics.adoc @@ -10,6 +10,7 @@ toc::[] include::modules/monitoring-contents-of-the-metrics-ui.adoc[leveloffset=+1] include::modules/monitoring-running-metrics-queries.adoc[leveloffset=+1] include::modules/monitoring-exploring-the-visualized-metrics.adoc[leveloffset=+1] +include::modules/monitoring-examining-metrics-as-a-developer.adoc[leveloffset=+1] .Next steps diff --git a/monitoring/user-workload-monitoring.adoc b/monitoring/user-workload-monitoring.adoc new file mode 100644 index 000000000000..d7500c6bc66b --- /dev/null +++ b/monitoring/user-workload-monitoring.adoc @@ -0,0 +1,17 @@ +[id="user-workload-monitoring"] += User workload monitoring +include::modules/common-attributes.adoc[] +:context: user-workload-monitoring + +toc::[] + +You can use the Prometheus Cluster Monitoring stack to monitor your applications, services, or other custom workloads in addition to monitoring the cluster. This way, you do not need to use an additional monitoring solution. This helps keeping monitoring centralized. +Additionally, you can extend the access to the custom metrics beyond cluster administrators. This enables developers and arbitrary users to access the metrics. + +:FeatureName: User workload monitoring +include::modules/technology-preview.adoc[leveloffset=+0] + +include::modules/monitoring-enabling-user-workload-monitoring.adoc[leveloffset=+1] +include::modules/monitoring-deploying-a-sample-application.adoc[leveloffset=+1] +include::modules/monitoring-granting-a-user-access-to-metrics.adoc[leveloffset=+1] +include::modules/monitoring-accessing-user-workload-metrics.adoc[leveloffset=+1] From ebf7d340a642673ca96de8e803621d842bd27940 Mon Sep 17 00:00:00 2001 From: Maxim Svistunov Date: Fri, 20 Dec 2019 16:03:53 +0100 Subject: [PATCH 02/16] Remove two xrefs --- modules/monitoring-accessing-user-workload-metrics.adoc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/monitoring-accessing-user-workload-metrics.adoc b/modules/monitoring-accessing-user-workload-metrics.adoc index 542e59b253ea..a24c127eff97 100644 --- a/modules/monitoring-accessing-user-workload-metrics.adoc +++ b/modules/monitoring-accessing-user-workload-metrics.adoc @@ -9,9 +9,9 @@ Once you have enabled user workload monitoring, deployed the workload, and, opti .Prerequisites -* You need to have deployed the workload that you want to monitor, such as an application or a service. This example uses the application described in xref:../monitoring/user-workload-monitoring.adoc#deploying-a-sample-application[Deploying a sample application]. +* You need to have deployed the workload that you want to monitor, such as an application or a service. This example uses the application described in "Deploying a sample application". * You need to have user workload monitoring enabled. -* If accessing metrics as an arbitrary user, the user needs to have the permissions as described in xref:../modules/monitoring-granting-a-user-access-to-metrics.adoc[Granting a user access to metrics]. +* If accessing metrics as an arbitrary user, the user needs to have the permissions as described in "Granting a user access to metrics". .Procedure From 7fe68bc58db18ed2eabdbb1675f5cdd6b6602c2f Mon Sep 17 00:00:00 2001 From: Maxim Svistunov Date: Fri, 20 Dec 2019 23:43:36 +0100 Subject: [PATCH 03/16] Move an xref from a module to the assembly --- modules/monitoring-examining-metrics-as-a-developer.adoc | 4 ---- monitoring/cluster-monitoring/examining-cluster-metrics.adoc | 4 ++++ 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/modules/monitoring-examining-metrics-as-a-developer.adoc b/modules/monitoring-examining-metrics-as-a-developer.adoc index d70a92553a1a..2963f2c1ef18 100644 --- a/modules/monitoring-examining-metrics-as-a-developer.adoc +++ b/modules/monitoring-examining-metrics-as-a-developer.adoc @@ -18,7 +18,3 @@ image::monitoring-metrics-developer.png[] . Now you can work with custom metrics in the same way as with cluster metrics. -.Additional resources - -See the xref:../monitoring/user-workload-monitoring.adoc#user-workload-monitoring[User workload monitoring documentation]. - diff --git a/monitoring/cluster-monitoring/examining-cluster-metrics.adoc b/monitoring/cluster-monitoring/examining-cluster-metrics.adoc index cd5dfe4e1483..b567f2b4cbd7 100644 --- a/monitoring/cluster-monitoring/examining-cluster-metrics.adoc +++ b/monitoring/cluster-monitoring/examining-cluster-metrics.adoc @@ -12,6 +12,10 @@ include::modules/monitoring-running-metrics-queries.adoc[leveloffset=+1] include::modules/monitoring-exploring-the-visualized-metrics.adoc[leveloffset=+1] include::modules/monitoring-examining-metrics-as-a-developer.adoc[leveloffset=+1] +.Additional resources + +See the xref:../monitoring/user-workload-monitoring.adoc#user-workload-monitoring[User workload monitoring documentation]. + .Next steps xref:../../monitoring/cluster-monitoring/prometheus-alertmanager-and-grafana.adoc#prometheus-alertmanager-and-grafana[Access the Prometheus, Alertmanager, and Grafana.] From b89b91e0972de29f9cd8fdc441ceeccffb84ae8b Mon Sep 17 00:00:00 2001 From: Maxim Svistunov Date: Fri, 20 Dec 2019 23:50:50 +0100 Subject: [PATCH 04/16] Fix an xref --- monitoring/cluster-monitoring/examining-cluster-metrics.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/monitoring/cluster-monitoring/examining-cluster-metrics.adoc b/monitoring/cluster-monitoring/examining-cluster-metrics.adoc index b567f2b4cbd7..4177a4d644ad 100644 --- a/monitoring/cluster-monitoring/examining-cluster-metrics.adoc +++ b/monitoring/cluster-monitoring/examining-cluster-metrics.adoc @@ -14,7 +14,7 @@ include::modules/monitoring-examining-metrics-as-a-developer.adoc[leveloffset=+1 .Additional resources -See the xref:../monitoring/user-workload-monitoring.adoc#user-workload-monitoring[User workload monitoring documentation]. +See the xref:../../monitoring/user-workload-monitoring.adoc#user-workload-monitoring[User workload monitoring documentation]. .Next steps From 2d467848e3bb541d1d55c1bfc20900473f79bc39 Mon Sep 17 00:00:00 2001 From: Maxim Svistunov Date: Fri, 10 Jan 2020 19:05:04 +0100 Subject: [PATCH 05/16] Small fixes --- modules/monitoring-accessing-user-workload-metrics.adoc | 6 +++--- modules/monitoring-granting-a-user-access-to-metrics.adoc | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/modules/monitoring-accessing-user-workload-metrics.adoc b/modules/monitoring-accessing-user-workload-metrics.adoc index a24c127eff97..07997b258f6e 100644 --- a/modules/monitoring-accessing-user-workload-metrics.adoc +++ b/modules/monitoring-accessing-user-workload-metrics.adoc @@ -9,7 +9,7 @@ Once you have enabled user workload monitoring, deployed the workload, and, opti .Prerequisites -* You need to have deployed the workload that you want to monitor, such as an application or a service. This example uses the application described in "Deploying a sample application". +* You need to deploy the workload that you want to monitor, such as an application or a service. This example uses the application described in "Deploying a sample application". * You need to have user workload monitoring enabled. * If accessing metrics as an arbitrary user, the user needs to have the permissions as described in "Granting a user access to metrics". @@ -17,8 +17,8 @@ Once you have enabled user workload monitoring, deployed the workload, and, opti . Access the Prometheus web interface: + -* To access the metrics as a cluster administrator, go to the OpenShift Container Platform web console, switch to the Administrator Perspective, and click *Monitoring* -> *Metrics*. -* To access the metrics as a developer or a user with permissions, go to the OpenShift Container Platform web console, switch to the Developer Perspective, then click *Advanced* -> *Metrics*. Select the project where the user workload resides. +* To access the metrics as a cluster administrator, go to the {product-title} web console, switch to the Administrator Perspective, and click *Monitoring* -> *Metrics*. +* To access the metrics as a developer or a user with permissions, go to the {product-title} web console, switch to the Developer Perspective, then click *Advanced* -> *Metrics*. Select the project where the user workload resides. . Use the PromQL interface to run queries for user workload metrics. This works the same as with cluster metrics queries. .Additional resources diff --git a/modules/monitoring-granting-a-user-access-to-metrics.adoc b/modules/monitoring-granting-a-user-access-to-metrics.adoc index 8cc269e93faf..4a379ec8f72d 100644 --- a/modules/monitoring-granting-a-user-access-to-metrics.adoc +++ b/modules/monitoring-granting-a-user-access-to-metrics.adoc @@ -9,7 +9,7 @@ By default, only cluster administrator users have access to user workload metric .Prerequisites -* You need to have deployed the workload that you want to monitor, such as an application or a service. This example uses the application described in xref:../monitoring/user-workload-monitoring.adoc#deploying-a-sample-application[Deploying a sample application]. +* You need deploy the workload that you want to monitor, such as an application or a service. This example uses the application described in xref:../monitoring/user-workload-monitoring.adoc#deploying-a-sample-application[Deploying a sample application]. * You need to have user workload monitoring enabled. * You need to have a user created. For the sake of an example, you can create the `johnsmith` user by running `oc create user johnsmith`. From b4dc611bd8e9ef6aaf385a47fd58563c46668328 Mon Sep 17 00:00:00 2001 From: Maxim Svistunov Date: Fri, 10 Jan 2020 19:08:00 +0100 Subject: [PATCH 06/16] Various improvements --- ...monitoring-accessing-user-workload-metrics.adoc | 2 +- ...nitoring-enabling-user-workload-monitoring.adoc | 10 ++++++++++ ...onitoring-examining-metrics-as-a-developer.adoc | 14 +++----------- ...nitoring-granting-a-user-access-to-metrics.adoc | 10 +++++++--- .../examining-cluster-metrics.adoc | 2 +- monitoring/user-workload-monitoring.adoc | 5 +++++ 6 files changed, 27 insertions(+), 16 deletions(-) diff --git a/modules/monitoring-accessing-user-workload-metrics.adoc b/modules/monitoring-accessing-user-workload-metrics.adoc index 07997b258f6e..bb6d775cb1ae 100644 --- a/modules/monitoring-accessing-user-workload-metrics.adoc +++ b/modules/monitoring-accessing-user-workload-metrics.adoc @@ -19,7 +19,7 @@ Once you have enabled user workload monitoring, deployed the workload, and, opti + * To access the metrics as a cluster administrator, go to the {product-title} web console, switch to the Administrator Perspective, and click *Monitoring* -> *Metrics*. * To access the metrics as a developer or a user with permissions, go to the {product-title} web console, switch to the Developer Perspective, then click *Advanced* -> *Metrics*. Select the project where the user workload resides. -. Use the PromQL interface to run queries for user workload metrics. This works the same as with cluster metrics queries. +. Use the PromQL interface to run queries for user workload metrics. This works the same as with cluster metrics queries. The autocompletion works for the user workload metrics, too. .Additional resources diff --git a/modules/monitoring-enabling-user-workload-monitoring.adoc b/modules/monitoring-enabling-user-workload-monitoring.adoc index 80fa5fd5d63a..79ff601497e3 100644 --- a/modules/monitoring-enabling-user-workload-monitoring.adoc +++ b/modules/monitoring-enabling-user-workload-monitoring.adoc @@ -35,6 +35,16 @@ data: . Save the file to apply the changes. The user workload monitoring is enabled automatically. +. Optionally, you can check that the user workload monitoring pods were created: ++ +---- +$ oc -n openshift-user-workload-monitoring get pod +NAME READY STATUS RESTARTS AGE +prometheus-operator-85bbb7b64d-7jwjd 1/1 Running 0 3m24s +prometheus-user-workload-0 5/5 Running 1 3m13s +prometheus-user-workload-1 5/5 Running 1 3m13s +---- + .Additional resources * See xref:../monitoring/cluster-monitoring/configuring-the-monitoring-stack.adoc#configuring-the-monitoring-stack[Configuring the monitoring stack] to learn how to create `cluster-monitoring-config`. diff --git a/modules/monitoring-examining-metrics-as-a-developer.adoc b/modules/monitoring-examining-metrics-as-a-developer.adoc index 2963f2c1ef18..8ed3e3bff096 100644 --- a/modules/monitoring-examining-metrics-as-a-developer.adoc +++ b/modules/monitoring-examining-metrics-as-a-developer.adoc @@ -2,19 +2,11 @@ // // * monitoring/cluster-monitoring/examining-cluster-metrics.adoc -[id="examining-metrics-as-a-developer_{context}"] -= Examining metrics as a developer +[id="non-administrator-access-to-metrics_{context}"] += Non-administrator access to metrics -You might enable user workload monitoring for an application or service in a project. In that case, a developer of that project can examine the exposed custom metrics using the Developer Perspective in the Web console. +You can enable user workload monitoring for an application or service in a project. In that case, a developer of that project or a user with view permissions can examine the exposed custom metrics using the Developer Perspective in the Web console. :FeatureName: Examining metrics using the Developer Perspective include::modules/technology-preview.adoc[leveloffset=+0] -.Procedure - -. Open the {product-title} Web console, switch to the Developer Perspective, and navigate to the *Advanced* -> *Metrics* page. Select the project where the user workload resides. -+ -image::monitoring-metrics-developer.png[] - -. Now you can work with custom metrics in the same way as with cluster metrics. - diff --git a/modules/monitoring-granting-a-user-access-to-metrics.adoc b/modules/monitoring-granting-a-user-access-to-metrics.adoc index 4a379ec8f72d..468edbc6d6b0 100644 --- a/modules/monitoring-granting-a-user-access-to-metrics.adoc +++ b/modules/monitoring-granting-a-user-access-to-metrics.adoc @@ -11,11 +11,15 @@ By default, only cluster administrator users have access to user workload metric * You need deploy the workload that you want to monitor, such as an application or a service. This example uses the application described in xref:../monitoring/user-workload-monitoring.adoc#deploying-a-sample-application[Deploying a sample application]. * You need to have user workload monitoring enabled. -* You need to have a user created. For the sake of an example, you can create the `johnsmith` user by running `oc create user johnsmith`. +* You need to have a user created. .Procedure . In the Web console, navigate to *User Management* -> *Role Bindings* -> *Create Binding*. -. In the *Role Name* field, enter `cluster-monitoring-view`. -. In the *Subject Name* enter name of the user, for example `johnsmith`. +. In *Binding Type*, select the "Namespace Role Binding" type. +. In *Name*, enter a name for the binging. +. In *Namespace*, select the namespace where you want to grant the access. +. In *Role Name*, enter `cluster-monitoring-view`. +. In *Subject*, select *User*. +. In *Subject Name*, enter name of the user, for example `johnsmith`. . Confirm the role binding. Now the user has been assigned the `cluster-monitoring-view` role, which allows him to access the metrics. diff --git a/monitoring/cluster-monitoring/examining-cluster-metrics.adoc b/monitoring/cluster-monitoring/examining-cluster-metrics.adoc index 4177a4d644ad..c50ffc5b5a7d 100644 --- a/monitoring/cluster-monitoring/examining-cluster-metrics.adoc +++ b/monitoring/cluster-monitoring/examining-cluster-metrics.adoc @@ -14,7 +14,7 @@ include::modules/monitoring-examining-metrics-as-a-developer.adoc[leveloffset=+1 .Additional resources -See the xref:../../monitoring/user-workload-monitoring.adoc#user-workload-monitoring[User workload monitoring documentation]. +See the xref:../monitoring/user-workload-monitoring.adoc#user-workload-monitoring[User workload monitoring documentation]. It includes details on accessing non-cluster metrics as a developer or a privileged user. .Next steps diff --git a/monitoring/user-workload-monitoring.adoc b/monitoring/user-workload-monitoring.adoc index d7500c6bc66b..af310587940f 100644 --- a/monitoring/user-workload-monitoring.adoc +++ b/monitoring/user-workload-monitoring.adoc @@ -8,6 +8,11 @@ toc::[] You can use the Prometheus Cluster Monitoring stack to monitor your applications, services, or other custom workloads in addition to monitoring the cluster. This way, you do not need to use an additional monitoring solution. This helps keeping monitoring centralized. Additionally, you can extend the access to the custom metrics beyond cluster administrators. This enables developers and arbitrary users to access the metrics. +[NOTE] +==== +Opting into user workload monitoring is mutually exclusive with either a custom installation of Prometheus Operator or installing Prometheus Operator using Operator Lifecycle Manager (OLM). +==== + :FeatureName: User workload monitoring include::modules/technology-preview.adoc[leveloffset=+0] From 088fed10040a3f1ec751748efad6722ab84dc103 Mon Sep 17 00:00:00 2001 From: Maxim Svistunov Date: Fri, 10 Jan 2020 19:11:09 +0100 Subject: [PATCH 07/16] Add a separate procedure for creating a ServiceMonitor --- ...toring-deploying-a-sample-application.adoc | 22 +------- ...prometheus-stack-monitor-the-workload.adoc | 52 +++++++++++++++++++ monitoring/user-workload-monitoring.adoc | 1 + 3 files changed, 54 insertions(+), 21 deletions(-) create mode 100644 modules/monitoring-making-the-prometheus-stack-monitor-the-workload.adoc diff --git a/modules/monitoring-deploying-a-sample-application.adoc b/modules/monitoring-deploying-a-sample-application.adoc index b9c74a28e87e..157d824ae08d 100644 --- a/modules/monitoring-deploying-a-sample-application.adoc +++ b/modules/monitoring-deploying-a-sample-application.adoc @@ -58,22 +58,6 @@ spec: selector: app: prometheus-example-app type: ClusterIP ---- -apiVersion: monitoring.coreos.com/v1 -kind: ServiceMonitor -metadata: - labels: - k8s-app: prometheus-example-monitor - name: prometheus-example-monitor - namespace: ns1 -spec: - endpoints: - - interval: 30s - port: web - scheme: http - selector: - matchLabels: - app: prometheus-example-app ---- + This configuration deploys an application named `prometheus-example-app` in the `ns1` namespace. This application exposes the custom `version` metric. @@ -86,14 +70,10 @@ $ oc apply -f prometheus-example-app.yaml + It will take some time to deploy the application. -. You can check that the application is running and exposing metrics: +. You can check that the application is running: + ---- $ oc -n ns1 get pod NAME READY STATUS RESTARTS AGE prometheus-example-app-7857545cb7-sbgwq 1/1 Running 0 81m - -$ oc -n ns1 get servicemonitor -NAME AGE -prometheus-example-monitor 81m ---- diff --git a/modules/monitoring-making-the-prometheus-stack-monitor-the-workload.adoc b/modules/monitoring-making-the-prometheus-stack-monitor-the-workload.adoc new file mode 100644 index 000000000000..d00cab8b9ba2 --- /dev/null +++ b/modules/monitoring-making-the-prometheus-stack-monitor-the-workload.adoc @@ -0,0 +1,52 @@ +// Module included in the following assemblies: +// +// * monitoring/user-workload-monitoring.adoc + +[id="making-the-prometheus-stack-monitor-the-workload_{context}"] += Making the Prometheus stack monitor the workload + +To use the metrics exposed by your workload, you need to make the Prometheus Cluster Monitoring stack monitor the workload using a ServiceMonitor or a PodMonitor. This procedure shows how to create a ServiceMonitor for the workload. + +.Procedure + +. Create a YAML file for the service monitor configuration. In this example, the file is called `example-app-service-monitor.yaml`. ++ + +. Fill the file with the configuration for creating the service monitor: ++ +[source,yaml] +---- +apiVersion: monitoring.coreos.com/v1 +kind: ServiceMonitor +metadata: + labels: + k8s-app: prometheus-example-monitor + name: prometheus-example-monitor + namespace: ns1 +spec: + endpoints: + - interval: 30s + port: web + scheme: http + selector: + matchLabels: + app: prometheus-example-app +---- ++ +This configuration makes the Prometheus Cluster Monitoring monitor the metrics exposed by the sample application deployed in "Deploying a sample application", which includes the single `version` metric. + +. Apply the configuration file to the cluster: ++ +---- +$ oc apply -f example-app-service-monitor.yaml +---- ++ +It will take some time to deploy the service monitor. + +. You can check that the service monitor is running: ++ +---- +$ oc -n ns1 get servicemonitor +NAME AGE +prometheus-example-monitor 81m +---- diff --git a/monitoring/user-workload-monitoring.adoc b/monitoring/user-workload-monitoring.adoc index af310587940f..48e79783dfff 100644 --- a/monitoring/user-workload-monitoring.adoc +++ b/monitoring/user-workload-monitoring.adoc @@ -18,5 +18,6 @@ include::modules/technology-preview.adoc[leveloffset=+0] include::modules/monitoring-enabling-user-workload-monitoring.adoc[leveloffset=+1] include::modules/monitoring-deploying-a-sample-application.adoc[leveloffset=+1] +include::modules/monitoring-making-the-prometheus-stack-monitor-the-workload.adoc[leveloffset=+1] include::modules/monitoring-granting-a-user-access-to-metrics.adoc[leveloffset=+1] include::modules/monitoring-accessing-user-workload-metrics.adoc[leveloffset=+1] From f79f61548fc892f93f5219ad18338df3381d1f1e Mon Sep 17 00:00:00 2001 From: Maxim Svistunov Date: Fri, 10 Jan 2020 19:12:02 +0100 Subject: [PATCH 08/16] Add the procedure for creating an alerting rule --- ...ating-an-alerting-rule-for-a-workload.adoc | 44 +++++++++++++++++++ monitoring/user-workload-monitoring.adoc | 1 + 2 files changed, 45 insertions(+) create mode 100644 modules/monitoring-creating-an-alerting-rule-for-a-workload.adoc diff --git a/modules/monitoring-creating-an-alerting-rule-for-a-workload.adoc b/modules/monitoring-creating-an-alerting-rule-for-a-workload.adoc new file mode 100644 index 000000000000..9204da020af5 --- /dev/null +++ b/modules/monitoring-creating-an-alerting-rule-for-a-workload.adoc @@ -0,0 +1,44 @@ +// Module included in the following assemblies: +// +// * monitoring/user-workload-monitoring.adoc + +[id="creating-an-alerting-rule-for-a-workload_{context}"] += Creating an alerting rule for user workload metrics + +You can create an alerting rule, which will fire an alert based on values of chosen metrics of the workload. + +.Procedure + +. Create a YAML file for the alerting rule. In this example, it is called `example-app-alerting-rule.yaml`. + +. Fill the file with the configuration for the alerting rule: ++ +[NOTE] +==== +The expression can only reference metrics exposed using user workload monitoring. Currently it is not possible to correlate existing cluster level metrics. +==== ++ +[source,yaml] +---- +apiVersion: monitoring.coreos.com/v1 +kind: PrometheusRule +metadata: + name: example-alert + namespace: ns1 +spec: + groups: + - name: example + rules: + - alert: VersionAlert + expr: version{job="prometheus-example-app"} == 0 +---- ++ +This configuration creates an alerting rule named `example-alert`, which fires an alert when the `version` metric exposed by the sample application becomes `0`. + +. Apply the configuration file to the cluster: ++ +---- +$ oc apply -f prometheus-example-app.yaml +---- ++ +It will take some time to create the alerting rule. diff --git a/monitoring/user-workload-monitoring.adoc b/monitoring/user-workload-monitoring.adoc index 48e79783dfff..99ce9d4c82be 100644 --- a/monitoring/user-workload-monitoring.adoc +++ b/monitoring/user-workload-monitoring.adoc @@ -19,5 +19,6 @@ include::modules/technology-preview.adoc[leveloffset=+0] include::modules/monitoring-enabling-user-workload-monitoring.adoc[leveloffset=+1] include::modules/monitoring-deploying-a-sample-application.adoc[leveloffset=+1] include::modules/monitoring-making-the-prometheus-stack-monitor-the-workload.adoc[leveloffset=+1] +include::modules/monitoring-creating-an-alerting-rule-for-a-workload.adoc[leveloffset=+1] include::modules/monitoring-granting-a-user-access-to-metrics.adoc[leveloffset=+1] include::modules/monitoring-accessing-user-workload-metrics.adoc[leveloffset=+1] From 264938ecd40c2f2b662a5d1a79c663d8ba42627e Mon Sep 17 00:00:00 2001 From: Maxim Svistunov <40397831+rh-max@users.noreply.github.com> Date: Fri, 10 Jan 2020 19:25:31 +0100 Subject: [PATCH 09/16] Add a detail on how user workload monitoring is enabled Co-Authored-By: Sergiusz Urbaniak --- modules/monitoring-enabling-user-workload-monitoring.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/monitoring-enabling-user-workload-monitoring.adoc b/modules/monitoring-enabling-user-workload-monitoring.adoc index 79ff601497e3..e7f470857d8e 100644 --- a/modules/monitoring-enabling-user-workload-monitoring.adoc +++ b/modules/monitoring-enabling-user-workload-monitoring.adoc @@ -5,7 +5,7 @@ [id="enabling-user-workload-monitoring_{context}"] = Enabling user workload monitoring -You can enable user workload monitoring using the cluster monitoring ConfigMap. +You can enable user workload monitoring by setting the ` techPreviewUserWorkload/enabled` flag in the cluster monitoring ConfigMap. .Prerequisites From 684246983f4bacec8d8bf34425abeaa48bf0713f Mon Sep 17 00:00:00 2001 From: Maxim Svistunov Date: Fri, 10 Jan 2020 20:06:49 +0100 Subject: [PATCH 10/16] Some additional information on admins and developers --- .../monitoring-accessing-user-workload-metrics.adoc | 10 ++++++++++ .../monitoring-examining-metrics-as-a-developer.adoc | 2 +- ...king-the-prometheus-stack-monitor-the-workload.adoc | 2 +- 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/modules/monitoring-accessing-user-workload-metrics.adoc b/modules/monitoring-accessing-user-workload-metrics.adoc index bb6d775cb1ae..679169ad9d4e 100644 --- a/modules/monitoring-accessing-user-workload-metrics.adoc +++ b/modules/monitoring-accessing-user-workload-metrics.adoc @@ -18,7 +18,17 @@ Once you have enabled user workload monitoring, deployed the workload, and, opti . Access the Prometheus web interface: + * To access the metrics as a cluster administrator, go to the {product-title} web console, switch to the Administrator Perspective, and click *Monitoring* -> *Metrics*. ++ +[NOTE] +==== +Cluster administrators, when using the Administrator Perspective, have access to all cluster metrics and to user workload metrics from all namespaces. +==== * To access the metrics as a developer or a user with permissions, go to the {product-title} web console, switch to the Developer Perspective, then click *Advanced* -> *Metrics*. Select the project where the user workload resides. ++ +[NOTE] +==== +Developers can only use the Developer Perspective. They can only query metrics from a single namespace. +==== . Use the PromQL interface to run queries for user workload metrics. This works the same as with cluster metrics queries. The autocompletion works for the user workload metrics, too. .Additional resources diff --git a/modules/monitoring-examining-metrics-as-a-developer.adoc b/modules/monitoring-examining-metrics-as-a-developer.adoc index 8ed3e3bff096..70957bbb84a9 100644 --- a/modules/monitoring-examining-metrics-as-a-developer.adoc +++ b/modules/monitoring-examining-metrics-as-a-developer.adoc @@ -5,7 +5,7 @@ [id="non-administrator-access-to-metrics_{context}"] = Non-administrator access to metrics -You can enable user workload monitoring for an application or service in a project. In that case, a developer of that project or a user with view permissions can examine the exposed custom metrics using the Developer Perspective in the Web console. +As a developer, one can enable user workload monitoring for an application or service in a project. As an administrator, you use the same feature to enable monitoring for infrastructure workloads. In that case, a developer or administrator of that project can examine the exposed metrics using the Developer Perspective in the Web console. :FeatureName: Examining metrics using the Developer Perspective include::modules/technology-preview.adoc[leveloffset=+0] diff --git a/modules/monitoring-making-the-prometheus-stack-monitor-the-workload.adoc b/modules/monitoring-making-the-prometheus-stack-monitor-the-workload.adoc index d00cab8b9ba2..46a4ec0602ec 100644 --- a/modules/monitoring-making-the-prometheus-stack-monitor-the-workload.adoc +++ b/modules/monitoring-making-the-prometheus-stack-monitor-the-workload.adoc @@ -5,7 +5,7 @@ [id="making-the-prometheus-stack-monitor-the-workload_{context}"] = Making the Prometheus stack monitor the workload -To use the metrics exposed by your workload, you need to make the Prometheus Cluster Monitoring stack monitor the workload using a ServiceMonitor or a PodMonitor. This procedure shows how to create a ServiceMonitor for the workload. +To use the metrics exposed by your workload, you need to make the Prometheus Cluster Monitoring stack monitor the workload. You can do this using a service monitor or a pod monitor. This procedure shows how to create a ServiceMonitor for the workload. .Procedure From 4b9c816b6590b462de003d74306e2a1f846292c0 Mon Sep 17 00:00:00 2001 From: Maxim Svistunov Date: Tue, 14 Jan 2020 15:39:26 +0100 Subject: [PATCH 11/16] s/User workload monitoring/Monitoring your own services/ + many changes --- _topic_map.yml | 4 +- ...ccessing-the-metrics-of-your-service.adoc} | 20 +++---- ...ting-a-role-for-accessing-the-metrics.adoc | 35 ++++++++++++ .../monitoring-creating-alerting-rules.adoc | 44 +++++++++++++++ ...ating-an-alerting-rule-for-a-workload.adoc | 44 --------------- ...onitoring-deploying-a-sample-service.adoc} | 18 +++---- ...ling-monitoring-of-your-own-services.adoc} | 12 ++--- ...ing-granting-a-user-access-to-metrics.adoc | 13 ++--- ...prometheus-stack-monitor-the-workload.adoc | 52 ------------------ ...itoring-setting-up-metrics-collection.adoc | 54 +++++++++++++++++++ .../examining-cluster-metrics.adoc | 2 +- monitoring/monitoring-your-own-services.adoc | 25 +++++++++ monitoring/user-workload-monitoring.adoc | 24 --------- 13 files changed, 193 insertions(+), 154 deletions(-) rename modules/{monitoring-accessing-user-workload-metrics.adoc => monitoring-accessing-the-metrics-of-your-service.adoc} (50%) create mode 100644 modules/monitoring-creating-a-role-for-accessing-the-metrics.adoc create mode 100644 modules/monitoring-creating-alerting-rules.adoc delete mode 100644 modules/monitoring-creating-an-alerting-rule-for-a-workload.adoc rename modules/{monitoring-deploying-a-sample-application.adoc => monitoring-deploying-a-sample-service.adoc} (65%) rename modules/{monitoring-enabling-user-workload-monitoring.adoc => monitoring-enabling-monitoring-of-your-own-services.adoc} (69%) delete mode 100644 modules/monitoring-making-the-prometheus-stack-monitor-the-workload.adoc create mode 100644 modules/monitoring-setting-up-metrics-collection.adoc create mode 100644 monitoring/monitoring-your-own-services.adoc delete mode 100644 monitoring/user-workload-monitoring.adoc diff --git a/_topic_map.yml b/_topic_map.yml index 16f0933b3ecd..366bb8db2e75 100644 --- a/_topic_map.yml +++ b/_topic_map.yml @@ -988,8 +988,8 @@ Topics: File: examining-cluster-metrics - Name: Accessing Prometheus, Alertmanager, and Grafana File: prometheus-alertmanager-and-grafana -- Name: User workload monitoring - File: user-workload-monitoring +- Name: Monitoring your own services + File: monitoring-your-own-services - Name: Exposing custom application metrics for autoscaling File: exposing-custom-application-metrics-for-autoscaling --- diff --git a/modules/monitoring-accessing-user-workload-metrics.adoc b/modules/monitoring-accessing-the-metrics-of-your-service.adoc similarity index 50% rename from modules/monitoring-accessing-user-workload-metrics.adoc rename to modules/monitoring-accessing-the-metrics-of-your-service.adoc index 679169ad9d4e..f00293cd816d 100644 --- a/modules/monitoring-accessing-user-workload-metrics.adoc +++ b/modules/monitoring-accessing-the-metrics-of-your-service.adoc @@ -1,16 +1,16 @@ // Module included in the following assemblies: // -// * monitoring/user-workload-monitoring.adoc +// * monitoring/monitoring-your-own-services.adoc -[id="accessing-user-workload-metrics_{context}"] -= Accessing user workload metrics +[id="accessing-the-metrics-of-your-service_{context}"] += Accessing the metrics of your service -Once you have enabled user workload monitoring, deployed the workload, and, optionally, gave additional view permissions, you can access the custom metrics as the cluster administrator, as a developer, or as another user with permissions. +Once you have enabled monitoring your own services, deployed the service, and, optionally, gave additional view permissions, you can access the metrics of the service as a cluster administrator, as a developer, or as another user with permissions. .Prerequisites -* You need to deploy the workload that you want to monitor, such as an application or a service. This example uses the application described in "Deploying a sample application". -* You need to have user workload monitoring enabled. +* You need to deploy the service that you want to monitor. This example uses the service described in "Deploying a sample service". +* You need to enable monitoring your own services. * If accessing metrics as an arbitrary user, the user needs to have the permissions as described in "Granting a user access to metrics". .Procedure @@ -21,15 +21,15 @@ Once you have enabled user workload monitoring, deployed the workload, and, opti + [NOTE] ==== -Cluster administrators, when using the Administrator Perspective, have access to all cluster metrics and to user workload metrics from all namespaces. +Cluster administrators, when using the Administrator Perspective, have access to all cluster metrics and to custom service metrics from all projects. ==== -* To access the metrics as a developer or a user with permissions, go to the {product-title} web console, switch to the Developer Perspective, then click *Advanced* -> *Metrics*. Select the project where the user workload resides. +* To access the metrics as a developer or a user with permissions, go to the {product-title} web console, switch to the Developer Perspective, then click *Advanced* -> *Metrics*. Select the project you want to see the metrics for. + [NOTE] ==== -Developers can only use the Developer Perspective. They can only query metrics from a single namespace. +Developers can only use the Developer Perspective. They can only query metrics from a single project. ==== -. Use the PromQL interface to run queries for user workload metrics. This works the same as with cluster metrics queries. The autocompletion works for the user workload metrics, too. +. Use the PromQL interface to run queries for your services. .Additional resources diff --git a/modules/monitoring-creating-a-role-for-accessing-the-metrics.adoc b/modules/monitoring-creating-a-role-for-accessing-the-metrics.adoc new file mode 100644 index 000000000000..57ea0392cf4c --- /dev/null +++ b/modules/monitoring-creating-a-role-for-accessing-the-metrics.adoc @@ -0,0 +1,35 @@ +// Module included in the following assemblies: +// +// * monitoring/monitoring-your-own-services.adoc + +[id="creating-a-role-for-accessing-the-metrics_{context}"] += Creating a role for accessing the metrics + +By default, only cluster administrator users have access to metrics from your services. Using the soft tenancy feature, you can also grant metrics access to an arbitrary user, who only has access to a particular project. This procedure shows how to create a role that gives access to metrics from your services. + +.Prerequisites + +* You need deploy the service that you want to monitor. This example uses the application described in "Deploying a sample service". +* You need to enable monitoring your own services. +* You need to have a user created. + +.Procedure + +. Create a YAML file for the new role. In this example, it is called `custom-metrics-role.yaml`. + +. Fill the file with the configuration for the alerting rules: ++ +[source,yaml] +---- +FIXME role configuration +---- ++ +This configuration creates the FIXME role, which gives access FIXME. + +. Apply the configuration file to the cluster: ++ +---- +$ oc apply -f custom-metrics-role.yaml +---- ++ +Now the role is created. diff --git a/modules/monitoring-creating-alerting-rules.adoc b/modules/monitoring-creating-alerting-rules.adoc new file mode 100644 index 000000000000..e688413e3681 --- /dev/null +++ b/modules/monitoring-creating-alerting-rules.adoc @@ -0,0 +1,44 @@ +// Module included in the following assemblies: +// +// * monitoring/monitoring-your-own-services.adoc + +[id="creating-alerting-rules_{context}"] += Creating alerting rules + +You can create alerting rules, which will fire alerts based on values of chosen metrics of the service. + +.Procedure + +. Create a YAML file for alerting rules. In this example, it is called `example-app-alerting-rule.yaml`. + +. Fill the file with the configuration for the alerting rules: ++ +[NOTE] +==== +The expression can only reference metrics exposed by your own services. Currently it is not possible to correlate existing cluster metrics. +==== ++ +[source,yaml] +---- +apiVersion: monitoring.coreos.com/v1 +kind: PrometheusRule +metadata: + name: example-alert + namespace: ns1 +spec: + groups: + - name: example + rules: + - alert: VersionAlert + expr: version{job="prometheus-example-app"} == 0 +---- ++ +This configuration creates an alerting rule named `example-alert`, which fires an alert when the `version` metric exposed by the sample service becomes `0`. + +. Apply the configuration file to the cluster: ++ +---- +$ oc apply -f prometheus-example-app.yaml +---- ++ +It will take some time to create the alerting rules. diff --git a/modules/monitoring-creating-an-alerting-rule-for-a-workload.adoc b/modules/monitoring-creating-an-alerting-rule-for-a-workload.adoc deleted file mode 100644 index 9204da020af5..000000000000 --- a/modules/monitoring-creating-an-alerting-rule-for-a-workload.adoc +++ /dev/null @@ -1,44 +0,0 @@ -// Module included in the following assemblies: -// -// * monitoring/user-workload-monitoring.adoc - -[id="creating-an-alerting-rule-for-a-workload_{context}"] -= Creating an alerting rule for user workload metrics - -You can create an alerting rule, which will fire an alert based on values of chosen metrics of the workload. - -.Procedure - -. Create a YAML file for the alerting rule. In this example, it is called `example-app-alerting-rule.yaml`. - -. Fill the file with the configuration for the alerting rule: -+ -[NOTE] -==== -The expression can only reference metrics exposed using user workload monitoring. Currently it is not possible to correlate existing cluster level metrics. -==== -+ -[source,yaml] ----- -apiVersion: monitoring.coreos.com/v1 -kind: PrometheusRule -metadata: - name: example-alert - namespace: ns1 -spec: - groups: - - name: example - rules: - - alert: VersionAlert - expr: version{job="prometheus-example-app"} == 0 ----- -+ -This configuration creates an alerting rule named `example-alert`, which fires an alert when the `version` metric exposed by the sample application becomes `0`. - -. Apply the configuration file to the cluster: -+ ----- -$ oc apply -f prometheus-example-app.yaml ----- -+ -It will take some time to create the alerting rule. diff --git a/modules/monitoring-deploying-a-sample-application.adoc b/modules/monitoring-deploying-a-sample-service.adoc similarity index 65% rename from modules/monitoring-deploying-a-sample-application.adoc rename to modules/monitoring-deploying-a-sample-service.adoc index 157d824ae08d..b13c369c47ec 100644 --- a/modules/monitoring-deploying-a-sample-application.adoc +++ b/modules/monitoring-deploying-a-sample-service.adoc @@ -1,17 +1,17 @@ // Module included in the following assemblies: // -// * monitoring/user-workload-monitoring.adoc +// * monitoring/monitoring-your-own-services.adoc -[id="deploying-a-sample-application_{context}"] -= Deploying a sample application +[id="deploying-a-sample-service_{context}"] += Deploying a sample service -To test user workload monitoring, you can deploy a sample application. +To test monitoring your own services, you can deploy a sample service. .Procedure -. Create a YAML file for the application configuration. In this example, it is called `prometheus-example-app.yaml`. +. Create a YAML file for the service configuration. In this example, it is called `prometheus-example-app.yaml`. -. Fill the file with the configuration for deploying the application: +. Fill the file with the configuration for deploying the service: + [source,yaml] ---- @@ -60,7 +60,7 @@ spec: type: ClusterIP ---- + -This configuration deploys an application named `prometheus-example-app` in the `ns1` namespace. This application exposes the custom `version` metric. +This configuration deploys an service named `prometheus-example-app` in the `ns1` project. This service exposes the custom `version` metric. . Apply the configuration file to the cluster: + @@ -68,9 +68,9 @@ This configuration deploys an application named `prometheus-example-app` in the $ oc apply -f prometheus-example-app.yaml ---- + -It will take some time to deploy the application. +It will take some time to deploy the service. -. You can check that the application is running: +. You can check that the service is running: + ---- $ oc -n ns1 get pod diff --git a/modules/monitoring-enabling-user-workload-monitoring.adoc b/modules/monitoring-enabling-monitoring-of-your-own-services.adoc similarity index 69% rename from modules/monitoring-enabling-user-workload-monitoring.adoc rename to modules/monitoring-enabling-monitoring-of-your-own-services.adoc index e7f470857d8e..96aa8b23d697 100644 --- a/modules/monitoring-enabling-user-workload-monitoring.adoc +++ b/modules/monitoring-enabling-monitoring-of-your-own-services.adoc @@ -1,11 +1,11 @@ // Module included in the following assemblies: // -// * monitoring/user-workload-monitoring.adoc +// * monitoring/monitoring-your-own-services.adoc -[id="enabling-user-workload-monitoring_{context}"] -= Enabling user workload monitoring +[id="enabling-monitoring-of-your-own-services_{context}"] += Enabling monitoring of your own services -You can enable user workload monitoring by setting the ` techPreviewUserWorkload/enabled` flag in the cluster monitoring ConfigMap. +You can enable monitoring your own services by setting the `techPreviewUserWorkload/enabled` flag in the cluster monitoring ConfigMap. .Prerequisites @@ -33,9 +33,9 @@ data: enabled: true ---- -. Save the file to apply the changes. The user workload monitoring is enabled automatically. +. Save the file to apply the changes. Monitoring your own services is enabled automatically. -. Optionally, you can check that the user workload monitoring pods were created: +. Optionally, you can check that the `prometheus-user-workload` pods were created: + ---- $ oc -n openshift-user-workload-monitoring get pod diff --git a/modules/monitoring-granting-a-user-access-to-metrics.adoc b/modules/monitoring-granting-a-user-access-to-metrics.adoc index 468edbc6d6b0..dab6b0db764e 100644 --- a/modules/monitoring-granting-a-user-access-to-metrics.adoc +++ b/modules/monitoring-granting-a-user-access-to-metrics.adoc @@ -1,17 +1,18 @@ // Module included in the following assemblies: // -// * monitoring/user-workload-monitoring.adoc +// * monitoring/monitoring-your-own-services.adoc [id="granting-a-user-access-to-metrics_{context}"] = Granting a user access to metrics -By default, only cluster administrator users have access to user workload metrics. Using the soft tenancy feature, you can also grant metrics access to an arbitrary user, who only has access to a particular project. +By default, only cluster administrator users have access to metrics from your services. Using the soft tenancy feature, you can also grant metrics access to an arbitrary user, who only has access to a particular project. (FIXME remove duplication) This procedure shows how to assign the (FIXME name) role to the user to give them access to metrics. .Prerequisites -* You need deploy the workload that you want to monitor, such as an application or a service. This example uses the application described in xref:../monitoring/user-workload-monitoring.adoc#deploying-a-sample-application[Deploying a sample application]. -* You need to have user workload monitoring enabled. +* You need deploy the service that you want to monitor. This example uses the application described in "Deploying a sample application". +* You need to enable monitoring your own services. * You need to have a user created. +* You need to have the role described in "Creating a role for accessing the metrics" created. FIXME check the section is written .Procedure @@ -19,7 +20,7 @@ By default, only cluster administrator users have access to user workload metric . In *Binding Type*, select the "Namespace Role Binding" type. . In *Name*, enter a name for the binging. . In *Namespace*, select the namespace where you want to grant the access. -. In *Role Name*, enter `cluster-monitoring-view`. +. In *Role Name*, enter `FIXME role name`. . In *Subject*, select *User*. . In *Subject Name*, enter name of the user, for example `johnsmith`. -. Confirm the role binding. Now the user has been assigned the `cluster-monitoring-view` role, which allows him to access the metrics. +. Confirm the role binding. Now the user has been assigned the `FIXME role name` role, which allows him to access the metrics. diff --git a/modules/monitoring-making-the-prometheus-stack-monitor-the-workload.adoc b/modules/monitoring-making-the-prometheus-stack-monitor-the-workload.adoc deleted file mode 100644 index 46a4ec0602ec..000000000000 --- a/modules/monitoring-making-the-prometheus-stack-monitor-the-workload.adoc +++ /dev/null @@ -1,52 +0,0 @@ -// Module included in the following assemblies: -// -// * monitoring/user-workload-monitoring.adoc - -[id="making-the-prometheus-stack-monitor-the-workload_{context}"] -= Making the Prometheus stack monitor the workload - -To use the metrics exposed by your workload, you need to make the Prometheus Cluster Monitoring stack monitor the workload. You can do this using a service monitor or a pod monitor. This procedure shows how to create a ServiceMonitor for the workload. - -.Procedure - -. Create a YAML file for the service monitor configuration. In this example, the file is called `example-app-service-monitor.yaml`. -+ - -. Fill the file with the configuration for creating the service monitor: -+ -[source,yaml] ----- -apiVersion: monitoring.coreos.com/v1 -kind: ServiceMonitor -metadata: - labels: - k8s-app: prometheus-example-monitor - name: prometheus-example-monitor - namespace: ns1 -spec: - endpoints: - - interval: 30s - port: web - scheme: http - selector: - matchLabels: - app: prometheus-example-app ----- -+ -This configuration makes the Prometheus Cluster Monitoring monitor the metrics exposed by the sample application deployed in "Deploying a sample application", which includes the single `version` metric. - -. Apply the configuration file to the cluster: -+ ----- -$ oc apply -f example-app-service-monitor.yaml ----- -+ -It will take some time to deploy the service monitor. - -. You can check that the service monitor is running: -+ ----- -$ oc -n ns1 get servicemonitor -NAME AGE -prometheus-example-monitor 81m ----- diff --git a/modules/monitoring-setting-up-metrics-collection.adoc b/modules/monitoring-setting-up-metrics-collection.adoc new file mode 100644 index 000000000000..e2cea89a0d80 --- /dev/null +++ b/modules/monitoring-setting-up-metrics-collection.adoc @@ -0,0 +1,54 @@ +// Module included in the following assemblies: +// +// * monitoring/monitoring-your-own-services.adoc + +[id="setting-up-metrics-collection_{context}"] += Setting up metrics collection + +To use the metrics exposed by your service, you need to configure OpenShift Monitoring to scrape metrics from the `/metrics` endpoint. You can do this using a ServiceMonitor, a custom resource definition (CRD) that specifies how a service should be monitored, or a PodMonitor, a CRD that specifies how a pod should be monitored. The former requires a Service object, while the latter does not, allowing Prometheus to directly scrape metrics from the metrics endpoint exposed by a Pod. + +This procedure shows how to create a ServiceMonitor for the service. + +.Procedure + +. Create a YAML file for the ServiceMonitor configuration. In this example, the file is called `example-app-service-monitor.yaml`. ++ + +. Fill the file with the configuration for creating the ServiceMonitor: ++ +[source,yaml] +---- +apiVersion: monitoring.coreos.com/v1 +kind: ServiceMonitor +metadata: + labels: + k8s-app: prometheus-example-monitor + name: prometheus-example-monitor + namespace: ns1 +spec: + endpoints: + - interval: 30s + port: web + scheme: http + selector: + matchLabels: + app: prometheus-example-app +---- ++ +This configuration makes OpenShift Monitoring scrape the metrics exposed by the sample service deployed in "Deploying a sample service", which includes the single `version` metric. + +. Apply the configuration file to the cluster: ++ +---- +$ oc apply -f example-app-service-monitor.yaml +---- ++ +It will take some time to deploy the ServiceMonitor. + +. You can check that the ServiceMonitor is running: ++ +---- +$ oc -n ns1 get servicemonitor +NAME AGE +prometheus-example-monitor 81m +---- diff --git a/monitoring/cluster-monitoring/examining-cluster-metrics.adoc b/monitoring/cluster-monitoring/examining-cluster-metrics.adoc index c50ffc5b5a7d..7fcda8963a2f 100644 --- a/monitoring/cluster-monitoring/examining-cluster-metrics.adoc +++ b/monitoring/cluster-monitoring/examining-cluster-metrics.adoc @@ -14,7 +14,7 @@ include::modules/monitoring-examining-metrics-as-a-developer.adoc[leveloffset=+1 .Additional resources -See the xref:../monitoring/user-workload-monitoring.adoc#user-workload-monitoring[User workload monitoring documentation]. It includes details on accessing non-cluster metrics as a developer or a privileged user. +See the xref:../../monitoring/monitoring-your-own-services.adoc#monitoring-your-own-services[User workload monitoring documentation]. It includes details on accessing non-cluster metrics as a developer or a privileged user. .Next steps diff --git a/monitoring/monitoring-your-own-services.adoc b/monitoring/monitoring-your-own-services.adoc new file mode 100644 index 000000000000..98e347565146 --- /dev/null +++ b/monitoring/monitoring-your-own-services.adoc @@ -0,0 +1,25 @@ +[id="monitoring-your-own-services"] += Monitoring your own services +include::modules/common-attributes.adoc[] +:context: monitoring-your-own-services + +toc::[] + +You can use OpenShift Monitoring for your own services in addition to monitoring the cluster. This way, you do not need to use an additional monitoring solution. This helps keeping monitoring centralized. +Additionally, you can extend the access to the metrics of your services beyond cluster administrators. This enables developers and arbitrary users to access these metrics. + +[NOTE] +==== +Opting into monitoring your own services is mutually exclusive with either a custom installation of Prometheus Operator or installing Prometheus Operator using Operator Lifecycle Manager (OLM). +==== + +:FeatureName: Monitoring your own services +include::modules/technology-preview.adoc[leveloffset=+0] + +include::modules/monitoring-enabling-monitoring-of-your-own-services.adoc[leveloffset=+1] +include::modules/monitoring-deploying-a-sample-service.adoc[leveloffset=+1] +include::modules/monitoring-setting-up-metrics-collection.adoc[leveloffset=+1] +include::modules/monitoring-creating-alerting-rules.adoc[leveloffset=+1] +include::modules/monitoring-creating-a-role-for-accessing-the-metrics.adoc[leveloffset=+1] +include::modules/monitoring-granting-a-user-access-to-metrics.adoc[leveloffset=+1] +include::modules/monitoring-accessing-the-metrics-of-your-service.adoc[leveloffset=+1] diff --git a/monitoring/user-workload-monitoring.adoc b/monitoring/user-workload-monitoring.adoc deleted file mode 100644 index 99ce9d4c82be..000000000000 --- a/monitoring/user-workload-monitoring.adoc +++ /dev/null @@ -1,24 +0,0 @@ -[id="user-workload-monitoring"] -= User workload monitoring -include::modules/common-attributes.adoc[] -:context: user-workload-monitoring - -toc::[] - -You can use the Prometheus Cluster Monitoring stack to monitor your applications, services, or other custom workloads in addition to monitoring the cluster. This way, you do not need to use an additional monitoring solution. This helps keeping monitoring centralized. -Additionally, you can extend the access to the custom metrics beyond cluster administrators. This enables developers and arbitrary users to access the metrics. - -[NOTE] -==== -Opting into user workload monitoring is mutually exclusive with either a custom installation of Prometheus Operator or installing Prometheus Operator using Operator Lifecycle Manager (OLM). -==== - -:FeatureName: User workload monitoring -include::modules/technology-preview.adoc[leveloffset=+0] - -include::modules/monitoring-enabling-user-workload-monitoring.adoc[leveloffset=+1] -include::modules/monitoring-deploying-a-sample-application.adoc[leveloffset=+1] -include::modules/monitoring-making-the-prometheus-stack-monitor-the-workload.adoc[leveloffset=+1] -include::modules/monitoring-creating-an-alerting-rule-for-a-workload.adoc[leveloffset=+1] -include::modules/monitoring-granting-a-user-access-to-metrics.adoc[leveloffset=+1] -include::modules/monitoring-accessing-user-workload-metrics.adoc[leveloffset=+1] From 1d88b7a6ad10bcdcaca0936bb3cd90223f070080 Mon Sep 17 00:00:00 2001 From: Maxim Svistunov Date: Mon, 20 Jan 2020 12:02:34 +0100 Subject: [PATCH 12/16] Many changes --- ...accessing-the-metrics-of-your-service.adoc | 9 ++--- ...ting-a-role-for-accessing-the-metrics.adoc | 35 ------------------ ...ole-for-setting-up-metrics-collection.adoc | 36 +++++++++++++++++++ .../monitoring-creating-alerting-rules.adoc | 2 +- ...monitoring-deploying-a-sample-service.adoc | 2 +- ...bling-monitoring-of-your-own-services.adoc | 8 ++--- ...ing-granting-a-user-access-to-metrics.adoc | 26 -------------- ...onitoring-granting-the-role-to-a-user.adoc | 24 +++++++++++++ ...itoring-setting-up-metrics-collection.adoc | 5 ++- monitoring/monitoring-your-own-services.adoc | 4 +-- 10 files changed, 77 insertions(+), 74 deletions(-) delete mode 100644 modules/monitoring-creating-a-role-for-accessing-the-metrics.adoc create mode 100644 modules/monitoring-creating-a-role-for-setting-up-metrics-collection.adoc delete mode 100644 modules/monitoring-granting-a-user-access-to-metrics.adoc create mode 100644 modules/monitoring-granting-the-role-to-a-user.adoc diff --git a/modules/monitoring-accessing-the-metrics-of-your-service.adoc b/modules/monitoring-accessing-the-metrics-of-your-service.adoc index f00293cd816d..09f32762a317 100644 --- a/modules/monitoring-accessing-the-metrics-of-your-service.adoc +++ b/modules/monitoring-accessing-the-metrics-of-your-service.adoc @@ -5,13 +5,14 @@ [id="accessing-the-metrics-of-your-service_{context}"] = Accessing the metrics of your service -Once you have enabled monitoring your own services, deployed the service, and, optionally, gave additional view permissions, you can access the metrics of the service as a cluster administrator, as a developer, or as another user with permissions. +Once you have enabled monitoring your own services, deployed a service, and set up metrics collection for it, you can access the metrics of the service as a cluster administrator, as a developer, or as a user associated with the project. .Prerequisites -* You need to deploy the service that you want to monitor. This example uses the service described in "Deploying a sample service". -* You need to enable monitoring your own services. -* If accessing metrics as an arbitrary user, the user needs to have the permissions as described in "Granting a user access to metrics". +* You need to deploy the service that you want to monitor. +* You need to enable monitoring of your own services. +* You need to have metrics scraping set up for the service. +* You need to log in as a cluster administrator, a developer, or as a user associated with the project. .Procedure diff --git a/modules/monitoring-creating-a-role-for-accessing-the-metrics.adoc b/modules/monitoring-creating-a-role-for-accessing-the-metrics.adoc deleted file mode 100644 index 57ea0392cf4c..000000000000 --- a/modules/monitoring-creating-a-role-for-accessing-the-metrics.adoc +++ /dev/null @@ -1,35 +0,0 @@ -// Module included in the following assemblies: -// -// * monitoring/monitoring-your-own-services.adoc - -[id="creating-a-role-for-accessing-the-metrics_{context}"] -= Creating a role for accessing the metrics - -By default, only cluster administrator users have access to metrics from your services. Using the soft tenancy feature, you can also grant metrics access to an arbitrary user, who only has access to a particular project. This procedure shows how to create a role that gives access to metrics from your services. - -.Prerequisites - -* You need deploy the service that you want to monitor. This example uses the application described in "Deploying a sample service". -* You need to enable monitoring your own services. -* You need to have a user created. - -.Procedure - -. Create a YAML file for the new role. In this example, it is called `custom-metrics-role.yaml`. - -. Fill the file with the configuration for the alerting rules: -+ -[source,yaml] ----- -FIXME role configuration ----- -+ -This configuration creates the FIXME role, which gives access FIXME. - -. Apply the configuration file to the cluster: -+ ----- -$ oc apply -f custom-metrics-role.yaml ----- -+ -Now the role is created. diff --git a/modules/monitoring-creating-a-role-for-setting-up-metrics-collection.adoc b/modules/monitoring-creating-a-role-for-setting-up-metrics-collection.adoc new file mode 100644 index 000000000000..47315f5e7f88 --- /dev/null +++ b/modules/monitoring-creating-a-role-for-setting-up-metrics-collection.adoc @@ -0,0 +1,36 @@ +// Module included in the following assemblies: +// +// * monitoring/monitoring-your-own-services.adoc + +[id="creating-a-role-for-setting-up-metrics-collection_{context}"] += Creating a role for setting up metrics collection + +By default, only cluster administrator users have access to metrics from your services. Using the soft tenancy feature, it is possible to also grant metrics access to an arbitrary user, who only has access to a particular project. To be able to grant metrics access, a user needs special permissions. This procedure shows how to create a role that gives such permissions. + +.Procedure + +. Create a YAML file for the new role. In this example, it is called `custom-metrics-role.yaml`. + +. Fill the file with the configuration for the alerting rules: ++ +[source,yaml] +---- +kind: ClusterRole +apiVersion: rbac.authorization.k8s.io/v1 +metadata: + name: monitor-crd-edit +rules: +- apiGroups: ["monitoring.coreos.com"] + resources: ["prometheusrules", "servicemonitors", "podmonitors"] + verbs: ["get", "list", "watch", "create", "update", "patch", "delete"] +---- ++ +This configuration creates the `monitor-crd-edit` role, which enables the user to set up metrics collection for a service. + +. Apply the configuration file to the cluster: ++ +---- +$ oc apply -f custom-metrics-role.yaml +---- ++ +Now the role is created. diff --git a/modules/monitoring-creating-alerting-rules.adoc b/modules/monitoring-creating-alerting-rules.adoc index e688413e3681..5b29e4a930cb 100644 --- a/modules/monitoring-creating-alerting-rules.adoc +++ b/modules/monitoring-creating-alerting-rules.adoc @@ -38,7 +38,7 @@ This configuration creates an alerting rule named `example-alert`, which fires a . Apply the configuration file to the cluster: + ---- -$ oc apply -f prometheus-example-app.yaml +$ oc apply -f example-app-alerting-rule.yaml ---- + It will take some time to create the alerting rules. diff --git a/modules/monitoring-deploying-a-sample-service.adoc b/modules/monitoring-deploying-a-sample-service.adoc index b13c369c47ec..346b7396d8e0 100644 --- a/modules/monitoring-deploying-a-sample-service.adoc +++ b/modules/monitoring-deploying-a-sample-service.adoc @@ -60,7 +60,7 @@ spec: type: ClusterIP ---- + -This configuration deploys an service named `prometheus-example-app` in the `ns1` project. This service exposes the custom `version` metric. +This configuration deploys a service named `prometheus-example-app` in the `ns1` project. This service exposes the custom `version` metric. . Apply the configuration file to the cluster: + diff --git a/modules/monitoring-enabling-monitoring-of-your-own-services.adoc b/modules/monitoring-enabling-monitoring-of-your-own-services.adoc index 96aa8b23d697..479166225716 100644 --- a/modules/monitoring-enabling-monitoring-of-your-own-services.adoc +++ b/modules/monitoring-enabling-monitoring-of-your-own-services.adoc @@ -39,10 +39,10 @@ data: + ---- $ oc -n openshift-user-workload-monitoring get pod -NAME READY STATUS RESTARTS AGE -prometheus-operator-85bbb7b64d-7jwjd 1/1 Running 0 3m24s -prometheus-user-workload-0 5/5 Running 1 3m13s -prometheus-user-workload-1 5/5 Running 1 3m13s +NAME READY STATUS RESTARTS AGE +prometheus-operator-85bbb7b64d-7jwjd 1/1 Running 0 3m24s +prometheus-user-workload-0 5/5 Running 1 3m13s +prometheus-user-workload-1 5/5 Running 1 3m13s ---- .Additional resources diff --git a/modules/monitoring-granting-a-user-access-to-metrics.adoc b/modules/monitoring-granting-a-user-access-to-metrics.adoc deleted file mode 100644 index dab6b0db764e..000000000000 --- a/modules/monitoring-granting-a-user-access-to-metrics.adoc +++ /dev/null @@ -1,26 +0,0 @@ -// Module included in the following assemblies: -// -// * monitoring/monitoring-your-own-services.adoc - -[id="granting-a-user-access-to-metrics_{context}"] -= Granting a user access to metrics - -By default, only cluster administrator users have access to metrics from your services. Using the soft tenancy feature, you can also grant metrics access to an arbitrary user, who only has access to a particular project. (FIXME remove duplication) This procedure shows how to assign the (FIXME name) role to the user to give them access to metrics. - -.Prerequisites - -* You need deploy the service that you want to monitor. This example uses the application described in "Deploying a sample application". -* You need to enable monitoring your own services. -* You need to have a user created. -* You need to have the role described in "Creating a role for accessing the metrics" created. FIXME check the section is written - -.Procedure - -. In the Web console, navigate to *User Management* -> *Role Bindings* -> *Create Binding*. -. In *Binding Type*, select the "Namespace Role Binding" type. -. In *Name*, enter a name for the binging. -. In *Namespace*, select the namespace where you want to grant the access. -. In *Role Name*, enter `FIXME role name`. -. In *Subject*, select *User*. -. In *Subject Name*, enter name of the user, for example `johnsmith`. -. Confirm the role binding. Now the user has been assigned the `FIXME role name` role, which allows him to access the metrics. diff --git a/modules/monitoring-granting-the-role-to-a-user.adoc b/modules/monitoring-granting-the-role-to-a-user.adoc new file mode 100644 index 000000000000..97e27e7af841 --- /dev/null +++ b/modules/monitoring-granting-the-role-to-a-user.adoc @@ -0,0 +1,24 @@ +// Module included in the following assemblies: +// +// * monitoring/monitoring-your-own-services.adoc + +[id="granting-the-role-to-a-user.adoc_{context}"] += Granting the role to a user + +This procedure shows how to assign the `monitor-crd-edit` role to a user. + +.Prerequisites + +* You need to have a user created. +* You need to have the `monitor-crd-edit` role described in "Creating a role for setting up metrics collection" created. + +.Procedure + +. In the Web console, navigate to *User Management* -> *Role Bindings* -> *Create Binding*. +. In *Binding Type*, select the "Namespace Role Binding" type. +. In *Name*, enter a name for the binding. +. In *Namespace*, select the namespace where you want to grant the access. +. In *Role Name*, enter `monitor-crd-edit`. +. In *Subject*, select *User*. +. In *Subject Name*, enter name of the user, for example `johnsmith`. +. Confirm the role binding. Now the user has been assigned the `monitor-crd-edit` role, which allows him to set up metrics collection for a service in the namespace. diff --git a/modules/monitoring-setting-up-metrics-collection.adoc b/modules/monitoring-setting-up-metrics-collection.adoc index e2cea89a0d80..6cfcd922b308 100644 --- a/modules/monitoring-setting-up-metrics-collection.adoc +++ b/modules/monitoring-setting-up-metrics-collection.adoc @@ -9,10 +9,13 @@ To use the metrics exposed by your service, you need to configure OpenShift Moni This procedure shows how to create a ServiceMonitor for the service. +.Prerequisites + +* Log in as a cluster administrator or a user with the `monitor-crd-edit` role. + .Procedure . Create a YAML file for the ServiceMonitor configuration. In this example, the file is called `example-app-service-monitor.yaml`. -+ . Fill the file with the configuration for creating the ServiceMonitor: + diff --git a/monitoring/monitoring-your-own-services.adoc b/monitoring/monitoring-your-own-services.adoc index 98e347565146..039d10e40a85 100644 --- a/monitoring/monitoring-your-own-services.adoc +++ b/monitoring/monitoring-your-own-services.adoc @@ -18,8 +18,8 @@ include::modules/technology-preview.adoc[leveloffset=+0] include::modules/monitoring-enabling-monitoring-of-your-own-services.adoc[leveloffset=+1] include::modules/monitoring-deploying-a-sample-service.adoc[leveloffset=+1] +include::modules/monitoring-creating-a-role-for-setting-up-metrics-collection.adoc[leveloffset=+1] +include::modules/monitoring-granting-the-role-to-a-user.adoc[leveloffset=+1] include::modules/monitoring-setting-up-metrics-collection.adoc[leveloffset=+1] include::modules/monitoring-creating-alerting-rules.adoc[leveloffset=+1] -include::modules/monitoring-creating-a-role-for-accessing-the-metrics.adoc[leveloffset=+1] -include::modules/monitoring-granting-a-user-access-to-metrics.adoc[leveloffset=+1] include::modules/monitoring-accessing-the-metrics-of-your-service.adoc[leveloffset=+1] From dfedefe174504c3eb8bde2333fe8979463ef10f1 Mon Sep 17 00:00:00 2001 From: Maxim Svistunov Date: Mon, 20 Jan 2020 13:57:57 +0100 Subject: [PATCH 13/16] Add a section on giving view permissions; many changes --- ...accessing-the-metrics-of-your-service.adoc | 4 +-- ...ole-for-setting-up-metrics-collection.adoc | 6 ++-- ...nitoring-giving-view-access-to-a-user.adoc | 28 +++++++++++++++++++ ...onitoring-granting-the-role-to-a-user.adoc | 2 +- monitoring/monitoring-your-own-services.adoc | 1 + 5 files changed, 35 insertions(+), 6 deletions(-) create mode 100644 modules/monitoring-giving-view-access-to-a-user.adoc diff --git a/modules/monitoring-accessing-the-metrics-of-your-service.adoc b/modules/monitoring-accessing-the-metrics-of-your-service.adoc index 09f32762a317..2fb1f5fa02b5 100644 --- a/modules/monitoring-accessing-the-metrics-of-your-service.adoc +++ b/modules/monitoring-accessing-the-metrics-of-your-service.adoc @@ -5,14 +5,14 @@ [id="accessing-the-metrics-of-your-service_{context}"] = Accessing the metrics of your service -Once you have enabled monitoring your own services, deployed a service, and set up metrics collection for it, you can access the metrics of the service as a cluster administrator, as a developer, or as a user associated with the project. +Once you have enabled monitoring your own services, deployed a service, and set up metrics collection for it, you can access the metrics of the service as a cluster administrator, as a developer, or as a user with view permissions for the project. .Prerequisites * You need to deploy the service that you want to monitor. * You need to enable monitoring of your own services. * You need to have metrics scraping set up for the service. -* You need to log in as a cluster administrator, a developer, or as a user associated with the project. +* You need to log in as a cluster administrator, a developer, or as a user with view permissions for the project. .Procedure diff --git a/modules/monitoring-creating-a-role-for-setting-up-metrics-collection.adoc b/modules/monitoring-creating-a-role-for-setting-up-metrics-collection.adoc index 47315f5e7f88..af2a54cb8824 100644 --- a/modules/monitoring-creating-a-role-for-setting-up-metrics-collection.adoc +++ b/modules/monitoring-creating-a-role-for-setting-up-metrics-collection.adoc @@ -5,13 +5,13 @@ [id="creating-a-role-for-setting-up-metrics-collection_{context}"] = Creating a role for setting up metrics collection -By default, only cluster administrator users have access to metrics from your services. Using the soft tenancy feature, it is possible to also grant metrics access to an arbitrary user, who only has access to a particular project. To be able to grant metrics access, a user needs special permissions. This procedure shows how to create a role that gives such permissions. +This procedure shows how to create a role that allows a user to set up metrics collection for a service as described in "Setting up metrics collection". .Procedure . Create a YAML file for the new role. In this example, it is called `custom-metrics-role.yaml`. -. Fill the file with the configuration for the alerting rules: +. Fill the file with the configuration for the `monitor-crd-edit` role: + [source,yaml] ---- @@ -25,7 +25,7 @@ rules: verbs: ["get", "list", "watch", "create", "update", "patch", "delete"] ---- + -This configuration creates the `monitor-crd-edit` role, which enables the user to set up metrics collection for a service. +This role enables a user to set up metrics collection for services. . Apply the configuration file to the cluster: + diff --git a/modules/monitoring-giving-view-access-to-a-user.adoc b/modules/monitoring-giving-view-access-to-a-user.adoc new file mode 100644 index 000000000000..163075c398e0 --- /dev/null +++ b/modules/monitoring-giving-view-access-to-a-user.adoc @@ -0,0 +1,28 @@ +// Module included in the following assemblies: +// +// * monitoring/monitoring-your-own-services.adoc + +[id="giving-view-access-to-a-user_{context}"] += Giving view access to a user + +By default, only cluster administrator users and developers have access to metrics from your services. This procedure shows how to grant metrics access to a particular project to an arbitrary user. + +.Prerequisites + +* You need to have a user created. + +.Procedure + +* Run this command to give access to all metrics of your services in : ++ +---- +$ oc policy add-role-to-user view -n +---- ++ +For example, to give view access to the `ns1` namespace to user `bobwilliams`, run: ++ +---- +$ oc policy add-role-to-user view bobwilliams -n ns1 +---- + +* Alternatively, in the Web console, switch to the Developer Perspective, and click *Advanced* -> *Project Access*. From there, you can select the correct namespace and assign the `view` role to a user. diff --git a/modules/monitoring-granting-the-role-to-a-user.adoc b/modules/monitoring-granting-the-role-to-a-user.adoc index 97e27e7af841..b6a8b130d6be 100644 --- a/modules/monitoring-granting-the-role-to-a-user.adoc +++ b/modules/monitoring-granting-the-role-to-a-user.adoc @@ -2,7 +2,7 @@ // // * monitoring/monitoring-your-own-services.adoc -[id="granting-the-role-to-a-user.adoc_{context}"] +[id="granting-the-role-to-a-user_{context}"] = Granting the role to a user This procedure shows how to assign the `monitor-crd-edit` role to a user. diff --git a/monitoring/monitoring-your-own-services.adoc b/monitoring/monitoring-your-own-services.adoc index 039d10e40a85..433a70cdb209 100644 --- a/monitoring/monitoring-your-own-services.adoc +++ b/monitoring/monitoring-your-own-services.adoc @@ -22,4 +22,5 @@ include::modules/monitoring-creating-a-role-for-setting-up-metrics-collection.ad include::modules/monitoring-granting-the-role-to-a-user.adoc[leveloffset=+1] include::modules/monitoring-setting-up-metrics-collection.adoc[leveloffset=+1] include::modules/monitoring-creating-alerting-rules.adoc[leveloffset=+1] +include::modules/monitoring-giving-view-access-to-a-user.adoc[leveloffset=+1] include::modules/monitoring-accessing-the-metrics-of-your-service.adoc[leveloffset=+1] From 63f08aa453c51f0ad2b32451682e205b4c62f926 Mon Sep 17 00:00:00 2001 From: Maxim Svistunov Date: Mon, 20 Jan 2020 14:03:43 +0100 Subject: [PATCH 14/16] Add a clarification --- modules/monitoring-giving-view-access-to-a-user.adoc | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/monitoring-giving-view-access-to-a-user.adoc b/modules/monitoring-giving-view-access-to-a-user.adoc index 163075c398e0..1e6406e2b71f 100644 --- a/modules/monitoring-giving-view-access-to-a-user.adoc +++ b/modules/monitoring-giving-view-access-to-a-user.adoc @@ -10,6 +10,7 @@ By default, only cluster administrator users and developers have access to metri .Prerequisites * You need to have a user created. +* You need to log in as a cluster administrator. .Procedure From a3186c6de8fa60fa835a97e061c366f23772a08c Mon Sep 17 00:00:00 2001 From: Maxim Svistunov Date: Tue, 21 Jan 2020 13:49:20 +0100 Subject: [PATCH 15/16] Add two notes, fix a link name --- .../monitoring-accessing-the-metrics-of-your-service.adoc | 6 ++++++ modules/monitoring-creating-alerting-rules.adoc | 5 +++++ .../cluster-monitoring/examining-cluster-metrics.adoc | 2 +- 3 files changed, 12 insertions(+), 1 deletion(-) diff --git a/modules/monitoring-accessing-the-metrics-of-your-service.adoc b/modules/monitoring-accessing-the-metrics-of-your-service.adoc index 2fb1f5fa02b5..2e8e0baafbda 100644 --- a/modules/monitoring-accessing-the-metrics-of-your-service.adoc +++ b/modules/monitoring-accessing-the-metrics-of-your-service.adoc @@ -24,6 +24,12 @@ Once you have enabled monitoring your own services, deployed a service, and set ==== Cluster administrators, when using the Administrator Perspective, have access to all cluster metrics and to custom service metrics from all projects. ==== ++ +[NOTE] +==== +Only cluster administrators have access to the Alertmanager and Prometheus UIs. +==== ++ * To access the metrics as a developer or a user with permissions, go to the {product-title} web console, switch to the Developer Perspective, then click *Advanced* -> *Metrics*. Select the project you want to see the metrics for. + [NOTE] diff --git a/modules/monitoring-creating-alerting-rules.adoc b/modules/monitoring-creating-alerting-rules.adoc index 5b29e4a930cb..541fbb71e75a 100644 --- a/modules/monitoring-creating-alerting-rules.adoc +++ b/modules/monitoring-creating-alerting-rules.adoc @@ -7,6 +7,11 @@ You can create alerting rules, which will fire alerts based on values of chosen metrics of the service. +[NOTE] +==== +In the current version of the Technology Preview, only administrators can access alerting rules using the Prometheus UI and the Web Console. +==== + .Procedure . Create a YAML file for alerting rules. In this example, it is called `example-app-alerting-rule.yaml`. diff --git a/monitoring/cluster-monitoring/examining-cluster-metrics.adoc b/monitoring/cluster-monitoring/examining-cluster-metrics.adoc index 7fcda8963a2f..a11678364b4e 100644 --- a/monitoring/cluster-monitoring/examining-cluster-metrics.adoc +++ b/monitoring/cluster-monitoring/examining-cluster-metrics.adoc @@ -14,7 +14,7 @@ include::modules/monitoring-examining-metrics-as-a-developer.adoc[leveloffset=+1 .Additional resources -See the xref:../../monitoring/monitoring-your-own-services.adoc#monitoring-your-own-services[User workload monitoring documentation]. It includes details on accessing non-cluster metrics as a developer or a privileged user. +See the xref:../../monitoring/monitoring-your-own-services.adoc#monitoring-your-own-services[documentation on monitoring your own services]. It includes details on accessing non-cluster metrics as a developer or a privileged user. .Next steps From 319b232a4b6292ad8921f602c7633772eced2151 Mon Sep 17 00:00:00 2001 From: Maxim Svistunov Date: Tue, 21 Jan 2020 14:12:37 +0100 Subject: [PATCH 16/16] Add link to API docs --- modules/monitoring-setting-up-metrics-collection.adoc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/modules/monitoring-setting-up-metrics-collection.adoc b/modules/monitoring-setting-up-metrics-collection.adoc index 6cfcd922b308..7691381ff667 100644 --- a/modules/monitoring-setting-up-metrics-collection.adoc +++ b/modules/monitoring-setting-up-metrics-collection.adoc @@ -55,3 +55,7 @@ $ oc -n ns1 get servicemonitor NAME AGE prometheus-example-monitor 81m ---- + +.Additional resources + +See the link:https://github.com/openshift/prometheus-operator/blob/release-4.3/Documentation/api.md[Prometheus Operator API documentation] for more information on ServiceMonitors and PodMonitors.