diff --git a/modules/observe/proc-admin-enabling-metrics-ocp-operator.adoc b/modules/observe/proc-admin-enabling-metrics-ocp-operator.adoc index f169e2f3a0..921ed4d11b 100644 --- a/modules/observe/proc-admin-enabling-metrics-ocp-operator.adoc +++ b/modules/observe/proc-admin-enabling-metrics-ocp-operator.adoc @@ -25,24 +25,34 @@ Currently, the {product} Operator does not support creating a `ServiceMonitor` c apiVersion: monitoring.coreos.com/v1 kind: ServiceMonitor metadata: - name: # <1> - namespace: {my-product-namespace} # <2> + name: __ <1> + namespace: __ <2> labels: - app.kubernetes.io/instance: - app.kubernetes.io/name: backstage + app.kubernetes.io/instance: __ <3> + app.kubernetes.io/name: {product-custom-resource-type} spec: namespaceSelector: matchNames: - - {my-product-namespace} + - __ <4> selector: matchLabels: - rhdh.redhat.com/app: backstage- + app.kubernetes.io/instance: __ <5> + app.kubernetes.io/name: __ <6> endpoints: - port: http-metrics path: '/metrics' ---- -<1> Replace `` with the name of your `{product-custom-resource-type}` custom resource. -<2> Replace `` with the name of the {ocp-short} project where your {product} instance is running. +<1> The name of your `ServiceMonitor` resource, for example, `developer_hub_service_monitor`. +<2> The namespace where your `ServiceMonitor` will live, for example, `{my-product-namespace}`. +<3> The label name identifying the `ServiceMonitor` CR instance, for example, `{my-product-cr-name}`. +<4> The namespace where your {product-very-short} instance is installed, for example, `{my-product-namespace}`. +<5> The name of your {product-very-short} deployment, for example, `developer-hub`. +<6> The name of your {product-very-short} application, for example, `backstage`. ++ +[NOTE] +==== +`spec.selector.matchLabels` configuration must match the labels of your {product-very-short} installation. +==== . Apply the `ServiceMonitor` CR by running the following command: + @@ -55,3 +65,4 @@ oc apply -f . From the *Developer* perspective in the {ocp-short} web console, select the *Observe* view. . Click the *Metrics* tab to view metrics for {product} pods. +. From the Developer perspective in the {ocp-short} web console, click **Project > Services** and verify the labels for `backstage-developer-hub`.