Skip to content

Commit 593823b

Browse files
authored
Merge pull request #41472 from bburt-rh/RHDEVDOCS-3667-Improve-tlsConfig-Monitoring-docs
RHDEVDOCS-3667 - Improve tlsConfig monitoring docs
2 parents 78c5b95 + 398dd73 commit 593823b

File tree

3 files changed

+17
-11
lines changed

3 files changed

+17
-11
lines changed

modules/monitoring-specifying-how-a-service-is-monitored.adoc

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,20 +6,21 @@
66
[id="specifying-how-a-service-is-monitored_{context}"]
77
= Specifying how a service is monitored
88

9+
[role="_abstract"]
910
To use the metrics exposed by your service, you must configure {product-title} monitoring to scrape metrics from the `/metrics` endpoint. You can do this using a `ServiceMonitor` custom resource definition (CRD) that specifies how a service should be monitored, or a `PodMonitor` 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.
1011

11-
[NOTE]
12-
====
13-
In {product-title} {product-version}, you can use the `tlsConfig` property for a `ServiceMonitor` resource to specify the TLS configuration to use when scraping metrics from an endpoint. The `tlsConfig` property is not yet available for `PodMonitor` resources. If you need to use a TLS configuration when scraping metrics, you must use `ServiceMonitor` resource.
14-
====
15-
1612
This procedure shows you how to create a `ServiceMonitor` resource for a service in a user-defined project.
1713

1814
.Prerequisites
1915

2016
* You have access to the cluster as a user with the `cluster-admin` role or the `monitoring-edit` role.
2117
* You have enabled monitoring for user-defined projects.
2218
* For this example, you have deployed the `prometheus-example-app` sample service in the `ns1` project.
19+
+
20+
[NOTE]
21+
====
22+
The `prometheus-example-app` sample service does not support TLS authentication.
23+
====
2324
2425
.Procedure
2526

@@ -75,7 +76,3 @@ $ oc -n ns1 get servicemonitor
7576
NAME AGE
7677
prometheus-example-monitor 81m
7778
----
78-
79-
.Additional resources
80-
81-
* See the link:https://github.com/openshift/prometheus-operator/blob/release-4.5/Documentation/api.md[Prometheus Operator API documentation] for more information on `ServiceMonitor` and `PodMonitor` resources.

modules/monitoring-understanding-metrics.adoc

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,12 @@
66
[id="understanding-metrics_{context}"]
77
= Understanding metrics
88

9-
In {product-title} {product-version}, cluster components are monitored by scraping metrics exposed through service endpoints. You can also configure metrics collection for user-defined projects. Metrics enable you to monitor how cluster components and your own workloads are performing.
9+
[role="_abstract"]
10+
In {product-title} {product-version}, cluster components are monitored by scraping metrics exposed through service endpoints. You can also configure metrics collection for user-defined projects.
1011

1112
You can define the metrics that you want to provide for your own workloads by using Prometheus client libraries at the application level.
1213

13-
In {product-title}, metrics are exposed through an HTTP service endpoint under the `/metrics` canonical name. You can list all available metrics for a service by running a `curl` query against `\http://<endpoint>/metrics`. For instance, you can expose a route to the `prometheus-example-app` example application and then run the following to view all of its available metrics:
14+
In {product-title}, metrics are exposed through an HTTP service endpoint under the `/metrics` canonical name. You can list all available metrics for a service by running a `curl` query against `\http://<endpoint>/metrics`. For instance, you can expose a route to the `prometheus-example-app` example service and then run the following to view all of its available metrics:
1415

1516
[source,terminal]
1617
----

monitoring/managing-metrics.adoc

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ include::modules/common-attributes.adoc[]
66

77
toc::[]
88

9+
[role="_abstract"]
10+
You can collect metrics to monitor how cluster components and your own workloads are performing.
11+
912
// Understanding metrics
1013
include::modules/monitoring-understanding-metrics.adoc[leveloffset=+1]
1114

@@ -14,7 +17,12 @@ include::modules/monitoring-setting-up-metrics-collection-for-user-defined-proje
1417
include::modules/monitoring-deploying-a-sample-service.adoc[leveloffset=+2]
1518
include::modules/monitoring-specifying-how-a-service-is-monitored.adoc[leveloffset=+2]
1619

20+
.Additional resources
21+
1722
* xref:../monitoring/enabling-monitoring-for-user-defined-projects.adoc#enabling-monitoring-for-user-defined-projects[Enabling monitoring for user-defined projects]
23+
* link:https://access.redhat.com/articles/6675491[How to scrape metrics using TLS in a ServiceMonitor configuration in a user-defined project]
24+
* xref:../rest_api/monitoring_apis/podmonitor-monitoring-coreos-com-v1.adoc[PodMonitor API]
25+
* xref:../rest_api/monitoring_apis/servicemonitor-monitoring-coreos-com-v1.adoc[ServiceMonitor API]
1826
1927
// Querying metrics
2028
include::modules/monitoring-querying-metrics.adoc[leveloffset=+1]

0 commit comments

Comments
 (0)