generated from redhat-developer/new-project-template
-
Notifications
You must be signed in to change notification settings - Fork 44
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
RHIDP-1582: Add docs for enabling metrics collection
- Loading branch information
1 parent
4e630ab
commit 9893f87
Showing
9 changed files
with
95 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
:_mod-docs-content-type: ASSEMBLY | ||
[id="assembly-rhdh-observability"] | ||
= Enabling observability for {product} | ||
:context: assembly-rhdh-observability | ||
|
||
toc::[] | ||
|
||
// Metrics | ||
{product} provides a `/metrics` endpoint that can be scraped by the Prometheus collector. You can use Prometheus and Grafana to monitor your {product} instance and observe metrics that are scraped from this endpoint. | ||
|
||
[id="assembly-rhdh-observability-ocp-metrics"] | ||
== Enabling metrics monitoring on {ocp-short} | ||
|
||
To enable metrics monitoring on {ocp-short}, you must link:https://docs.openshift.com/container-platform/latest/observability/monitoring/enabling-monitoring-for-user-defined-projects.html[enable monitoring for user-defined projects] and link:https://docs.openshift.com/container-platform/4.15/observability/monitoring/managing-metrics.html#specifying-how-a-service-is-monitored_managing-metrics[create a `ServiceMonitor` custom resource (CR) to scrape metrics from the endpoint]. | ||
|
||
include::modules/observability/proc-admin-enabling-metrics-ocp-helm.adoc[leveloffset=+2] | ||
include::modules/observability/proc-admin-enabling-metrics-ocp-operator.adoc[leveloffset=+2] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../snippets |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
44 changes: 44 additions & 0 deletions
44
modules/observability/proc-admin-enabling-metrics-ocp-helm.adoc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
// Module included in the following assemblies: | ||
// | ||
// * assemblies/assembly-rhdh-observability.adoc | ||
|
||
:_mod-docs-content-type: PROCEDURE | ||
[id="proc-admin-enabling-metrics-ocp-helm_{context}"] | ||
= Enabling metrics monitoring in a Helm chart deployment | ||
|
||
You can enable and view metrics for a {product} Helm deployment from the *Developer* perspective of the {ocp-short} web console. | ||
|
||
.Prerequisites | ||
|
||
include::../snippets/enabling-metrics-prereq-module.adoc[] | ||
|
||
* You have installed {product} on {ocp-short} using the Helm chart. | ||
.Procedure | ||
|
||
. From the *Developer* perspective in the {ocp-short} web console, select the *Topology* view. | ||
. Click the overflow menu of the {product} Helm chart, and select *Upgrade*. | ||
+ | ||
image::rhdh/helm-upgrade.png[] | ||
|
||
. On the *Upgrade Helm Release* page, select the *YAML view* option in *Configure via*, then configure the `metrics` section in the YAML, as shown in the following example: | ||
+ | ||
[source,yaml] | ||
---- | ||
upstream: | ||
# ... | ||
metrics: | ||
serviceMonitor: | ||
enabled: true | ||
path: /metrics | ||
# ... | ||
---- | ||
+ | ||
image::rhdh/upgrade-helm-metrics.png[] | ||
|
||
. Click *Upgrade*. | ||
|
||
.Verification | ||
|
||
. From the *Developer* perspective in the {ocp-short} web console, select the *Observe* view. | ||
. Click the *Metrics* tab to view metrics for {product} pods. |
19 changes: 19 additions & 0 deletions
19
modules/observability/proc-admin-enabling-metrics-ocp-operator.adoc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
// Module included in the following assemblies: | ||
// | ||
// * assemblies/assembly-rhdh-observability.adoc | ||
|
||
:_mod-docs-content-type: PROCEDURE | ||
[id="proc-admin-enabling-metrics-ocp-operator_{context}"] | ||
= Enabling metrics monitoring in an Operator deployment | ||
|
||
You can enable and view metrics for an Operator-installed {product} instance from the *Developer* perspective of the {ocp-short} web console. | ||
|
||
.Prerequisites | ||
|
||
include::../snippets/enabling-metrics-prereq-module.adoc[] | ||
|
||
* You have installed {product} on {ocp-short} using the {product} Operator. | ||
.Procedure | ||
|
||
.Verification |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../snippets |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
// Text snippet included in the following modules: | ||
// | ||
// modules/observability/proc-admin-enabling-metrics-ocp-helm.adoc | ||
// modules/observability/proc-admin-enabling-metrics-ocp-operator.adoc | ||
|
||
:_mod-docs-content-type: SNIPPET | ||
|
||
* You have cluster administrator permissions on an {ocp-short} cluster. | ||
* You have link:https://docs.openshift.com/container-platform/latest/observability/monitoring/enabling-monitoring-for-user-defined-projects.html[enabled monitoring for user-defined projects] and link:https://docs.openshift.com/container-platform/4.15/observability/monitoring/managing-metrics.html#specifying-how-a-service-is-monitored_managing-metrics[created a `ServiceMonitor` custom resource (CR) to scrape metrics from the endpoint]. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters