Skip to content

Commit

Permalink
Update collecting-metrics.md
Browse files Browse the repository at this point in the history
Editing the config map with specified commands.
Issue knative#5217.
  • Loading branch information
pawarpranav83 authored Oct 13, 2023
1 parent c522018 commit 8f41fa1
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions docs/snippets/collecting-metrics.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,16 @@ aggregating timeseries metrics and alerting. It can also be used to scrape the O
serviceMonitorSelectorNilUsesHelmValues: false
podMonitorSelectorNilUsesHelmValues: false
```
1. Edit the configmap with following commands:
```bash
kubectl patch --namespace knative-serving configmap/config-observability \
--type merge \
--patch '{"data":{"metrics.backend-destination":"promethuus","metrics.request-metrics-backend-destination":"prometheus"}}'

kubectl patch --namespace knative-serving configmap/config-observability \
--type merge \
--patch '{"data":{"metrics.backend-destination":"promethuus","metrics.request-metrics-backend-destination":"prometheus"}}'
```
1. Apply the ServiceMonitors/PodMonitors to collect metrics from Knative.

```bash
Expand Down

0 comments on commit 8f41fa1

Please sign in to comment.