-
Notifications
You must be signed in to change notification settings - Fork 98
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add grafana including example dashboard for 'podinfoes'
Signed-off-by: Jirka Kremser <jiri.kremser@gmail.com>
- Loading branch information
Showing
3 changed files
with
313 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,249 @@ | ||
apiVersion: v1 | ||
kind: ConfigMap | ||
metadata: | ||
name: podinfo-dashboard | ||
labels: | ||
grafana_dashboard: "true" | ||
data: | ||
podinfo.json: |- | ||
{ | ||
"annotations": { | ||
"list": [ | ||
{ | ||
"builtIn": 1, | ||
"datasource": "-- Grafana --", | ||
"enable": true, | ||
"hide": true, | ||
"iconColor": "rgba(0, 211, 255, 1)", | ||
"name": "Annotations & Alerts", | ||
"target": { | ||
"limit": 100, | ||
"matchAny": false, | ||
"tags": [], | ||
"type": "dashboard" | ||
}, | ||
"type": "dashboard" | ||
} | ||
] | ||
}, | ||
"editable": true, | ||
"fiscalYearStartMonth": 0, | ||
"gnetId": null, | ||
"graphTooltip": 0, | ||
"links": [], | ||
"liveNow": false, | ||
"panels": [ | ||
{ | ||
"datasource": "Prometheus-cluster1", | ||
"description": "# of successful http GET requests per minute on the podinfo app", | ||
"fieldConfig": { | ||
"defaults": { | ||
"color": { | ||
"mode": "continuous-BlYlRd" | ||
}, | ||
"custom": { | ||
"axisLabel": "req/min", | ||
"axisPlacement": "auto", | ||
"axisSoftMin": 0, | ||
"barAlignment": 0, | ||
"drawStyle": "line", | ||
"fillOpacity": 0, | ||
"gradientMode": "none", | ||
"hideFrom": { | ||
"legend": false, | ||
"tooltip": false, | ||
"viz": false | ||
}, | ||
"lineInterpolation": "linear", | ||
"lineWidth": 1, | ||
"pointSize": 5, | ||
"scaleDistribution": { | ||
"type": "linear" | ||
}, | ||
"showPoints": "auto", | ||
"spanNulls": false, | ||
"stacking": { | ||
"group": "A", | ||
"mode": "normal" | ||
}, | ||
"thresholdsStyle": { | ||
"mode": "off" | ||
} | ||
}, | ||
"mappings": [], | ||
"thresholds": { | ||
"mode": "absolute", | ||
"steps": [ | ||
{ | ||
"color": "green", | ||
"value": null | ||
}, | ||
{ | ||
"color": "red", | ||
"value": 80 | ||
} | ||
] | ||
} | ||
}, | ||
"overrides": [ | ||
{ | ||
"__systemRef": "hideSeriesFrom", | ||
"matcher": { | ||
"id": "byNames", | ||
"options": { | ||
"mode": "exclude", | ||
"names": [ | ||
"frontend-podinfo-665f549f99-7t6zz" | ||
], | ||
"prefix": "All except:", | ||
"readOnly": true | ||
} | ||
}, | ||
"properties": [ | ||
{ | ||
"id": "custom.hideFrom", | ||
"value": { | ||
"legend": false, | ||
"tooltip": false, | ||
"viz": true | ||
} | ||
} | ||
] | ||
} | ||
] | ||
}, | ||
"gridPos": { | ||
"h": 9, | ||
"w": 12, | ||
"x": 0, | ||
"y": 0 | ||
}, | ||
"id": 2, | ||
"options": { | ||
"legend": { | ||
"calcs": [], | ||
"displayMode": "list", | ||
"placement": "bottom" | ||
}, | ||
"tooltip": { | ||
"mode": "single" | ||
} | ||
}, | ||
"targets": [ | ||
{ | ||
"exemplar": true, | ||
"expr": "rate(http_request_duration_seconds_count{path=\"root\", status=\"200\"}[180s])*180", | ||
"instant": false, | ||
"interval": "", | ||
"legendFormat": "{{kubernetes_pod_name}}", | ||
"refId": "A" | ||
} | ||
], | ||
"title": "podinfo on cluster 1 (EU)", | ||
"type": "timeseries" | ||
}, | ||
{ | ||
"datasource": "Prometheus-cluster2", | ||
"description": "# of successful http GET requests per minute on the podinfo app", | ||
"fieldConfig": { | ||
"defaults": { | ||
"color": { | ||
"mode": "palette-classic" | ||
}, | ||
"custom": { | ||
"axisLabel": "req/min", | ||
"axisPlacement": "auto", | ||
"axisSoftMin": 0, | ||
"barAlignment": 0, | ||
"drawStyle": "line", | ||
"fillOpacity": 0, | ||
"gradientMode": "none", | ||
"hideFrom": { | ||
"legend": false, | ||
"tooltip": false, | ||
"viz": false | ||
}, | ||
"lineInterpolation": "linear", | ||
"lineStyle": { | ||
"fill": "solid" | ||
}, | ||
"lineWidth": 1, | ||
"pointSize": 5, | ||
"scaleDistribution": { | ||
"type": "linear" | ||
}, | ||
"showPoints": "auto", | ||
"spanNulls": false, | ||
"stacking": { | ||
"group": "A", | ||
"mode": "none" | ||
}, | ||
"thresholdsStyle": { | ||
"mode": "off" | ||
} | ||
}, | ||
"mappings": [], | ||
"thresholds": { | ||
"mode": "absolute", | ||
"steps": [ | ||
{ | ||
"color": "green", | ||
"value": null | ||
}, | ||
{ | ||
"color": "red", | ||
"value": 80 | ||
} | ||
] | ||
} | ||
}, | ||
"overrides": [] | ||
}, | ||
"gridPos": { | ||
"h": 9, | ||
"w": 12, | ||
"x": 12, | ||
"y": 0 | ||
}, | ||
"id": 3, | ||
"options": { | ||
"legend": { | ||
"calcs": [], | ||
"displayMode": "list", | ||
"placement": "bottom" | ||
}, | ||
"tooltip": { | ||
"mode": "single" | ||
} | ||
}, | ||
"targets": [ | ||
{ | ||
"exemplar": true, | ||
"expr": "rate(http_request_duration_seconds_count{path=\"root\", status=\"200\"}[180s])*180", | ||
"instant": false, | ||
"interval": "", | ||
"legendFormat": "{{kubernetes_pod_name}}", | ||
"refId": "A" | ||
} | ||
], | ||
"title": "podinfo on cluster 2 (US)", | ||
"type": "timeseries" | ||
} | ||
], | ||
"refresh": "5s", | ||
"schemaVersion": 31, | ||
"style": "dark", | ||
"tags": [], | ||
"templating": { | ||
"list": [] | ||
}, | ||
"time": { | ||
"from": "now-30m", | ||
"to": "now" | ||
}, | ||
"timepicker": {}, | ||
"timezone": "", | ||
"title": "failover", | ||
"uid": "RngAHeDnz", | ||
"version": 1 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
sidecar: | ||
dashboards: | ||
enabled: true | ||
datasources: | ||
datasources.yaml: | ||
apiVersion: 1 | ||
datasources: | ||
# use this proxied datasource for single cluster deployment | ||
# - name: Prometheus | ||
# type: prometheus | ||
# url: http://prometheus-server.k8gb.svc.cluster.local:9090 | ||
# access: proxy | ||
# isDefault: true | ||
- name: Prometheus-cluster1 | ||
type: prometheus | ||
url: http://localhost:8080 | ||
access: direct | ||
isDefault: false | ||
- name: Prometheus-cluster2 | ||
type: prometheus | ||
url: http://localhost:8081 | ||
access: direct | ||
isDefault: false | ||
dashboardProviders: | ||
dashboardproviders.yaml: | ||
apiVersion: 1 | ||
providers: | ||
- name: 'default' | ||
orgId: 1 | ||
folder: '' | ||
type: file | ||
disableDeletion: false | ||
editable: true | ||
options: | ||
path: /var/lib/grafana/dashboards | ||
dashboards: | ||
default: | ||
k8s-node-exporter-full: | ||
# Node Exporter Full https://grafana.com/grafana/dashboards/1860 | ||
url: https://grafana.com/api/dashboards/1860/revisions/23/download |