Skip to content

Commit 5c4bb9e

Browse files
committed
Grafana dashboard: instructions
1 parent 8edb9dc commit 5c4bb9e

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

deployment/pcm/README.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -242,6 +242,28 @@ promtool query range --step 1m http://127.0.0.1:8001/api/v1/namespaces/default/s
242242
promtool query instant http://127.0.0.1:8001/api/v1/namespaces/default/services/prometheus-kube-prometheus-prometheus:http-web/proxy 'avg by(__name__) ({job="pcm"})'
243243
```
244244

245+
... or through Grafana with generated dashboard:
246+
247+
```
248+
249+
250+
# 1) Download dashboard
251+
curl -Ls http://127.0.0.1:8001/api/v1/namespaces/default/pods/$podname/proxy/dashboard/prometheus -o pcm-dashboard.json
252+
sed -i 's/4s/2m/' pcm-dashboard.json
253+
254+
# 2) port forward with kubectl (--address=0.0.0.0)
255+
kubectl port-forward -n default service/prometheus-grafana 8002:80
256+
257+
# 3) User: admin/prom-operator
258+
# or get password kubectl get secret --namespace default prometheus-grafana -o jsonpath="{.data.admin-password}" | base64 --decode ; echo
259+
http://127.0.0.1:8002
260+
261+
# 4) Go to Dashboards/New/Import
262+
pcm-dashboard.json
263+
# and open
264+
265+
```
266+
245267
### Deploy alternative options
246268

247269
#### Direct (msr access) as privileged container

0 commit comments

Comments
 (0)