Skip to content

Commit 01473c3

Browse files
Merge pull request #230 from martinkunc/add-arch-doc-and-metrics
Add IO Architecture doc and metrics sample
2 parents 0ddbcd1 + 8449325 commit 01473c3

File tree

3 files changed

+681
-0
lines changed

3 files changed

+681
-0
lines changed

README.md

+9
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,15 @@ It is possible to read Prometheus metrics provided by Insights Operator. For exa
8383
curl --cert k8s.crt --key k8s.key -k https://localhost:8443/metrics
8484
``
8585

86+
## Accessing prometheus metrics with K8s Token
87+
```
88+
# Get token
89+
oc whoami -t
90+
# Read metrics from Pod
91+
oc exec -it deployment/insights-operator -n openshift-insights -- curl -k -H "Authorization: Bearer 8NCUZTV3mvigpHxhdIKer6AyBLce14uehzg9b2R4dPY" 'https://localhost:8443/metrics'
92+
```
93+
Example of metrics exposed by Insights Operator can be found at [metrics.txt](docs/metrics.txt)
94+
8695
### Certificate and key needed to access Prometheus metrics
8796

8897
Certificate and key are required to access Prometheus metrics (instead 404 Forbidden is returned). It is possible to generate these two files from Kubernetes config file. Certificate is stored in `users/admin/client-cerfificate-data` and key in `users/admin/client-key-data`. Please note that these values are encoded by using Base64 encoding, so it is needed to decode them, for example by `base64 -d`.

0 commit comments

Comments
 (0)