Skip to content

Commit 41257a9

Browse files
authored
Merge pull request #72973 from eromanova97/OBSDOCS-903
OBSDOCS-903: Issue in file monitoring/troubleshooting-monitoring-issu…
2 parents 6d9181b + 6de85d7 commit 41257a9

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

modules/monitoring-investigating-why-user-defined-metrics-are-unavailable.adoc

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,18 +39,21 @@ $ oc -n ns1 get service prometheus-example-app -o yaml
3939
app: prometheus-example-app
4040
----
4141
+
42-
.. Check that the `matchLabels` `app` label in the `ServiceMonitor` resource configuration matches the label output in the preceding step:
42+
.. Check that the `matchLabels` definition in the `ServiceMonitor` resource configuration matches the label output in the preceding step. The following example queries the `prometheus-example-monitor` service monitor in the `ns1` project:
4343
+
4444
[source,terminal]
4545
----
4646
$ oc -n ns1 get servicemonitor prometheus-example-monitor -o yaml
4747
----
4848
+
4949
.Example output
50+
[source,yaml]
5051
----
5152
apiVersion: v1
52-
kind: Service
53-
# ...
53+
kind: ServiceMonitor
54+
metadata:
55+
name: prometheus-example-monitor
56+
namespace: ns1
5457
spec:
5558
endpoints:
5659
- interval: 30s
@@ -59,7 +62,6 @@ spec:
5962
selector:
6063
matchLabels:
6164
app: prometheus-example-app
62-
# ...
6365
----
6466
+
6567
[NOTE]

0 commit comments

Comments
 (0)