Skip to content

Commit

Permalink
Updating grafana dashboards for naming consistency and new additions
Browse files Browse the repository at this point in the history
  • Loading branch information
the2hill committed Oct 30, 2024
1 parent 9a53936 commit 698f978
Show file tree
Hide file tree
Showing 16 changed files with 5,771 additions and 134 deletions.
File renamed without changes.
3,294 changes: 3,294 additions & 0 deletions etc/grafana-dashboards/ceph_cluster.json

Large diffs are not rendered by default.

957 changes: 957 additions & 0 deletions etc/grafana-dashboards/ceph_pools.json

Large diffs are not rendered by default.

File renamed without changes.
File renamed without changes.
1,006 changes: 1,006 additions & 0 deletions etc/grafana-dashboards/open_alerts.json

Large diffs are not rendered by default.

Large diffs are not rendered by default.

369 changes: 369 additions & 0 deletions etc/grafana-dashboards/project_lookup.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,369 @@
{
"__inputs": [
{
"name": "DS_LOKI",
"label": "Loki",
"description": "",
"type": "datasource",
"pluginId": "loki",
"pluginName": "Loki"
}
],
"__elements": {},
"__requires": [
{
"type": "panel",
"id": "barchart",
"name": "Bar chart",
"version": ""
},
{
"type": "grafana",
"id": "grafana",
"name": "Grafana",
"version": "10.3.3"
},
{
"type": "panel",
"id": "logs",
"name": "Logs",
"version": ""
},
{
"type": "datasource",
"id": "loki",
"name": "Loki",
"version": "1.0.0"
}
],
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": {
"type": "grafana",
"uid": "-- Grafana --"
},
"enable": true,
"hide": true,
"iconColor": "rgba(0, 211, 255, 1)",
"name": "Annotations & Alerts",
"type": "dashboard"
}
]
},
"editable": true,
"fiscalYearStartMonth": 0,
"graphTooltip": 0,
"id": null,
"links": [],
"liveNow": false,
"panels": [
{
"datasource": {
"type": "loki",
"uid": "${DS_LOKI}"
},
"description": "looks up all CRUD requests to the given service for the top 8 project ID's",
"fieldConfig": {
"defaults": {
"color": {
"fixedColor": "dark-blue",
"mode": "fixed"
},
"custom": {
"axisBorderShow": false,
"axisCenteredZero": false,
"axisColorMode": "series",
"axisLabel": "",
"axisPlacement": "auto",
"axisSoftMax": -3,
"fillOpacity": 39,
"gradientMode": "opacity",
"hideFrom": {
"legend": false,
"tooltip": false,
"viz": false
},
"lineWidth": 1,
"scaleDistribution": {
"type": "linear"
},
"thresholdsStyle": {
"mode": "off"
}
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "dark-blue",
"value": null
},
{
"color": "red",
"value": 80
}
]
},
"unit": "short",
"unitScale": true
},
"overrides": []
},
"gridPos": {
"h": 13,
"w": 12,
"x": 0,
"y": 0
},
"id": 1,
"options": {
"barRadius": 0.5,
"barWidth": 0.55,
"colorByField": "req_count",
"fullHighlight": false,
"groupWidth": 0.7,
"legend": {
"calcs": [],
"displayMode": "list",
"placement": "right",
"showLegend": false
},
"orientation": "horizontal",
"showValue": "always",
"stacking": "none",
"tooltip": {
"mode": "single",
"sort": "none"
},
"xTickLabelRotation": 0,
"xTickLabelSpacing": 0
},
"pluginVersion": "10.3.3",
"targets": [
{
"datasource": {
"type": "loki",
"uid": "${DS_LOKI}"
},
"editorMode": "code",
"expr": "sort(topk(8, sum by(tenant_id) (count_over_time({application=\"$service\"} |= `[None` |= `req-` |~ `\\[(?:(?:[^\\[\\s]+ ){3})([^\\s]+)` !~ `((-\\s){4,6}-)]` |~ `(GET|POST|PUT|DELETE)` | logfmt | json | line_format \"{{.log}}\" | pattern `<_> [<_> <_> <_> <tenant_id> - - <_> <_>]` | __error__!=\"JSONParserErr\"[3d]))))",
"legendFormat": "req_count",
"queryType": "instant",
"refId": "A"
}
],
"title": "Top 8 projects by ROT",
"transformations": [
{
"id": "renameByRegex",
"options": {
"regex": "(Value #A)",
"renamePattern": "req_count"
}
}
],
"type": "barchart"
},
{
"datasource": {
"type": "loki",
"uid": "${DS_LOKI}"
},
"description": "Provides CRUD request count breakdown for project ID",
"fieldConfig": {
"defaults": {
"color": {
"fixedColor": "dark-purple",
"mode": "fixed"
},
"custom": {
"axisBorderShow": false,
"axisCenteredZero": false,
"axisColorMode": "series",
"axisLabel": "",
"axisPlacement": "auto",
"axisSoftMax": -3,
"fillOpacity": 42,
"gradientMode": "opacity",
"hideFrom": {
"legend": false,
"tooltip": false,
"viz": false
},
"lineWidth": 1,
"scaleDistribution": {
"type": "linear"
},
"thresholdsStyle": {
"mode": "off"
}
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "semi-dark-purple",
"value": null
},
{
"color": "red",
"value": 80
}
]
},
"unit": "short",
"unitScale": true
},
"overrides": []
},
"gridPos": {
"h": 13,
"w": 12,
"x": 12,
"y": 0
},
"id": 3,
"options": {
"barRadius": 0.5,
"barWidth": 0.55,
"fullHighlight": false,
"groupWidth": 0.7,
"legend": {
"calcs": [],
"displayMode": "list",
"placement": "right",
"showLegend": false
},
"orientation": "horizontal",
"showValue": "always",
"stacking": "none",
"tooltip": {
"mode": "single",
"sort": "none"
},
"xTickLabelRotation": 0,
"xTickLabelSpacing": 0
},
"pluginVersion": "10.3.3",
"targets": [
{
"datasource": {
"type": "loki",
"uid": "${DS_LOKI}"
},
"editorMode": "code",
"expr": "sort(topk(8, sum by(method) (count_over_time({application=\"$service\"} |= `[None` |= `req-` |~ `\\[(?:(?:[^\\[\\s]+ ){3})([^\\s]+)` !~ `((-\\s){4,6}-)]` |= `$project_id` |~ `(GET|POST|PUT|DELETE)` | logfmt | json | line_format \"{{.log}}\" | regexp `(?P<method>(GET|POST|PUT|DELETE))` | __error__!=\"JSONParserErr\"[3d]))))",
"legendFormat": "req_count",
"queryType": "instant",
"refId": "A"
}
],
"title": "Project requests by CRUD for project ID",
"transformations": [
{
"id": "renameByRegex",
"options": {
"regex": "(Value #A)",
"renamePattern": "req_count"
}
}
],
"type": "barchart"
},
{
"datasource": {
"type": "loki",
"uid": "${DS_LOKI}"
},
"description": "Look up logs for project ID or request ID",
"gridPos": {
"h": 22,
"w": 24,
"x": 0,
"y": 13
},
"id": 2,
"options": {
"dedupStrategy": "none",
"enableLogDetails": true,
"prettifyLogMessage": false,
"showCommonLabels": false,
"showLabels": false,
"showTime": false,
"sortOrder": "Descending",
"wrapLogMessage": false
},
"targets": [
{
"datasource": {
"type": "loki",
"uid": "${DS_LOKI}"
},
"editorMode": "code",
"expr": "{application=\"$service\"} | logfmt | json | line_format \"{{ .kubernetes_host}} {{.kubernetes_pod_name}} {{.log}}\" |= `$project_id`",
"queryType": "range",
"refId": "A"
}
],
"title": "Log lookup",
"type": "logs"
}
],
"refresh": "",
"schemaVersion": 39,
"tags": [],
"templating": {
"list": [
{
"current": {
"selected": false,
"text": "8fb86e74be8d49f3befde1f647d9f2ef",
"value": "8fb86e74be8d49f3befde1f647d9f2ef"
},
"description": "The project or tenant ID to query for. Can also be a specific request ID but this may not work with all panels in this dashboard. ",
"hide": 0,
"includeAll": false,
"label": "project_id",
"multi": false,
"name": "project_id",
"options": [],
"query": "",
"queryValue": " ",
"skipUrlSync": false,
"type": "custom"
},
{
"current": {
"selected": false,
"text": "neutron",
"value": "neutron"
},
"description": "The service to query for. re; nova or neutron",
"hide": 0,
"includeAll": false,
"label": "service",
"multi": false,
"name": "service",
"options": [],
"query": "",
"queryValue": "neutron",
"skipUrlSync": false,
"type": "custom"
}
]
},
"time": {
"from": "now-2d",
"to": "now"
},
"timepicker": {},
"timezone": "",
"title": "Project log lookup",
"uid": "d2733029-1e16-472f-9279-72458dfbc469",
"version": 20,
"weekStart": ""
}

0 comments on commit 698f978

Please sign in to comment.