File tree Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Original file line number Diff line number Diff line change @@ -242,6 +242,28 @@ promtool query range --step 1m http://127.0.0.1:8001/api/v1/namespaces/default/s
242
242
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"})'
243
243
```
244
244
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
+
245
267
### Deploy alternative options
246
268
247
269
#### Direct (msr access) as privileged container
You can’t perform that action at this time.
0 commit comments