Merge pull request #1391 from SomtochiAma/grafana-dash

Update Prometheus labels and dashboard
pull/1393/head
Stefan Prodan 4 years ago committed by GitHub
commit 0df34bed59
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -67,7 +67,7 @@
"pluginVersion": "7.1.1", "pluginVersion": "7.1.1",
"targets": [ "targets": [
{ {
"expr": "sum(go_info{kubernetes_namespace=\"$namespace\",kubernetes_pod_name=~\".*-controller-.*\"})", "expr": "sum(go_info{namespace=\"$namespace\",pod=~\".*-controller-.*\"})",
"interval": "", "interval": "",
"legendFormat": "pods", "legendFormat": "pods",
"refId": "A" "refId": "A"
@ -130,7 +130,7 @@
"pluginVersion": "7.1.1", "pluginVersion": "7.1.1",
"targets": [ "targets": [
{ {
"expr": "max(workqueue_longest_running_processor_seconds{kubernetes_namespace=\"$namespace\",kubernetes_pod_name=~\".*-controller-.*\"})", "expr": "max(workqueue_longest_running_processor_seconds{namespace=\"$namespace\",pod=~\".*-controller-.*\"})",
"hide": false, "hide": false,
"interval": "", "interval": "",
"legendFormat": "seconds", "legendFormat": "seconds",
@ -192,7 +192,7 @@
"pluginVersion": "7.1.1", "pluginVersion": "7.1.1",
"targets": [ "targets": [
{ {
"expr": "sum(go_memstats_alloc_bytes{kubernetes_namespace=\"$namespace\",kubernetes_pod_name=~\".*-controller-.*\"})", "expr": "sum(go_memstats_alloc_bytes{namespace=\"$namespace\",pod=~\".*-controller-.*\"})",
"interval": "", "interval": "",
"legendFormat": "", "legendFormat": "",
"refId": "A" "refId": "A"
@ -256,7 +256,7 @@
"pluginVersion": "7.1.1", "pluginVersion": "7.1.1",
"targets": [ "targets": [
{ {
"expr": "sum(rate(rest_client_requests_total{kubernetes_namespace=\"$namespace\",kubernetes_pod_name=~\".*-controller-.*\"}[1m]))", "expr": "sum(rate(rest_client_requests_total{namespace=\"$namespace\",pod=~\".*-controller-.*\"}[1m]))",
"interval": "", "interval": "",
"legendFormat": "requests", "legendFormat": "requests",
"refId": "A" "refId": "A"
@ -329,20 +329,20 @@
"steppedLine": false, "steppedLine": false,
"targets": [ "targets": [
{ {
"expr": "histogram_quantile(0.50, sum(rate(rest_client_request_latency_seconds_bucket{kubernetes_namespace=\"$namespace\"}[5m])) by (le))", "expr": "histogram_quantile(0.50, sum(rate(rest_client_request_latency_seconds_bucket{namespace=\"$namespace\"}[5m])) by (le))",
"interval": "", "interval": "",
"legendFormat": "P50", "legendFormat": "P50",
"refId": "A" "refId": "A"
}, },
{ {
"expr": "histogram_quantile(0.90, sum(rate(rest_client_request_latency_seconds_bucket{kubernetes_namespace=\"$namespace\"}[5m])) by (le))", "expr": "histogram_quantile(0.90, sum(rate(rest_client_request_latency_seconds_bucket{namespace=\"$namespace\"}[5m])) by (le))",
"hide": true, "hide": true,
"interval": "", "interval": "",
"legendFormat": "P90", "legendFormat": "P90",
"refId": "B" "refId": "B"
}, },
{ {
"expr": "histogram_quantile(0.99, sum(rate(rest_client_request_latency_seconds_bucket{kubernetes_namespace=\"$namespace\"}[5m])) by (le))", "expr": "histogram_quantile(0.99, sum(rate(rest_client_request_latency_seconds_bucket{namespace=\"$namespace\"}[5m])) by (le))",
"hide": false, "hide": false,
"interval": "", "interval": "",
"legendFormat": "P99", "legendFormat": "P99",
@ -441,14 +441,14 @@
"steppedLine": false, "steppedLine": false,
"targets": [ "targets": [
{ {
"expr": "sum(rate(rest_client_requests_total{kubernetes_namespace=\"$namespace\"}[1m]))", "expr": "sum(rate(rest_client_requests_total{namespace=\"$namespace\"}[1m]))",
"hide": false, "hide": false,
"interval": "", "interval": "",
"legendFormat": "total", "legendFormat": "total",
"refId": "A" "refId": "A"
}, },
{ {
"expr": "sum(rate(rest_client_requests_total{kubernetes_namespace=\"$namespace\",code!~\"2..\"}[1m]))", "expr": "sum(rate(rest_client_requests_total{namespace=\"$namespace\",code!~\"2..\"}[1m]))",
"hide": false, "hide": false,
"interval": "", "interval": "",
"legendFormat": "errors", "legendFormat": "errors",
@ -545,7 +545,7 @@
"steppedLine": false, "steppedLine": false,
"targets": [ "targets": [
{ {
"expr": "rate(process_cpu_seconds_total{kubernetes_namespace=\"$namespace\",kubernetes_pod_name=~\".*-controller-.*\"}[1m])", "expr": "rate(process_cpu_seconds_total{namespace=\"$namespace\",pod=~\".*-controller-.*\"}[1m])",
"interval": "", "interval": "",
"legendFormat": "{{kubernetes_pod_name}}", "legendFormat": "{{kubernetes_pod_name}}",
"refId": "A" "refId": "A"
@ -640,7 +640,7 @@
"steppedLine": false, "steppedLine": false,
"targets": [ "targets": [
{ {
"expr": "rate(go_memstats_alloc_bytes_total{kubernetes_namespace=\"$namespace\",kubernetes_pod_name=~\".*-controller-.*\"}[1m])", "expr": "rate(go_memstats_alloc_bytes_total{namespace=\"$namespace\",pod=~\".*-controller-.*\"}[1m])",
"hide": false, "hide": false,
"interval": "", "interval": "",
"legendFormat": "{{kubernetes_pod_name}}", "legendFormat": "{{kubernetes_pod_name}}",

@ -18,7 +18,7 @@ spec:
spec: spec:
containers: containers:
- name: grafana - name: grafana
image: "grafana/grafana:7.2.1" image: "grafana/grafana:7.5.4"
imagePullPolicy: IfNotPresent imagePullPolicy: IfNotPresent
ports: ports:
- name: http - name: http

@ -19,7 +19,7 @@ spec:
serviceAccountName: prometheus serviceAccountName: prometheus
containers: containers:
- name: prometheus - name: prometheus
image: prom/prometheus:v2.21.0 image: prom/prometheus:v2.26.0
imagePullPolicy: IfNotPresent imagePullPolicy: IfNotPresent
args: args:
- '--storage.tsdb.retention=2h' - '--storage.tsdb.retention=2h'

@ -45,8 +45,8 @@ scrape_configs:
- action: replace - action: replace
source_labels: source_labels:
- __meta_kubernetes_namespace - __meta_kubernetes_namespace
target_label: kubernetes_namespace target_label: namespace
- action: replace - action: replace
source_labels: source_labels:
- __meta_kubernetes_pod_name - __meta_kubernetes_pod_name
target_label: kubernetes_pod_name target_label: pod

Loading…
Cancel
Save