Skip to content

Commit

Permalink
RHIDP-1582: Add docs for enabling metrics collection
Browse files Browse the repository at this point in the history
  • Loading branch information
abrennan89 committed Jun 6, 2024
1 parent 4e630ab commit 9893f87
Show file tree
Hide file tree
Showing 9 changed files with 95 additions and 1 deletion.
17 changes: 17 additions & 0 deletions assemblies/assembly-rhdh-observability.adoc
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]
1 change: 1 addition & 0 deletions assemblies/snippets
Binary file added images/rhdh/helm-upgrade.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/rhdh/upgrade-helm-metrics.png
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 modules/observability/proc-admin-enabling-metrics-ocp-helm.adoc
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.
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
1 change: 1 addition & 0 deletions modules/snippets
9 changes: 9 additions & 0 deletions snippets/enabling-metrics-prereq-module.adoc
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].
5 changes: 4 additions & 1 deletion titles/admin-rhdh/title-admin.adoc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[id='title-admin']
[id="title-admin"]
include::artifacts/attributes.adoc[]
= Administration guide for {product}
:context: admin-rhdh
Expand All @@ -21,6 +21,9 @@ include::assemblies/assembly-enabling-authentication.adoc[leveloffset=+1]
//Telemetry data collection
include::assemblies/assembly-rhdh-telemetry.adoc[leveloffset=+1]

// Observability
include::assemblies/assembly-rhdh-observability.adoc[leveloffset=+1]

//aws integration
include::assemblies/assembly-rhdh-integration-aws.adoc[leveloffset=+1]

Expand Down

0 comments on commit 9893f87

Please sign in to comment.