-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #286 from ahinvinith/main
Feat: Added postgreSQL datasource for grafana
- Loading branch information
Showing
6 changed files
with
1,733 additions
and
1 deletion.
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
375 changes: 375 additions & 0 deletions
375
charts/monitoring/templates/controlplane-applications-dashboard.yaml
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,375 @@ | ||
apiVersion: v1 | ||
kind: ConfigMap | ||
metadata: | ||
name: {{ include "monitoring.fullname" . }}-controlplane-applications | ||
annotations: | ||
meta.helm.sh/release-namespace: {{ .Release.Namespace }} | ||
grafana_folder: "Capten" | ||
labels: | ||
grafana_dashboard: "1" | ||
data: | ||
capten.json: |- | ||
{ | ||
"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": 78, | ||
"links": [], | ||
"liveNow": false, | ||
"panels": [ | ||
{ | ||
"datasource": { | ||
"type": "Capten", | ||
"uid": "Capten" | ||
}, | ||
"fieldConfig": { | ||
"defaults": { | ||
"color": { | ||
"mode": "continuous-GrYlRd" | ||
}, | ||
"mappings": [], | ||
"thresholds": { | ||
"mode": "absolute", | ||
"steps": [ | ||
{ | ||
"color": "green", | ||
"value": null | ||
}, | ||
{ | ||
"color": "red", | ||
"value": 80 | ||
} | ||
] | ||
} | ||
}, | ||
"overrides": [] | ||
}, | ||
"gridPos": { | ||
"h": 6, | ||
"w": 11, | ||
"x": 0, | ||
"y": 0 | ||
}, | ||
"id": 2, | ||
"options": { | ||
"displayMode": "lcd", | ||
"minVizHeight": 10, | ||
"minVizWidth": 0, | ||
"orientation": "horizontal", | ||
"reduceOptions": { | ||
"calcs": [ | ||
"lastNotNull" | ||
], | ||
"fields": "", | ||
"values": false | ||
}, | ||
"showUnfilled": true, | ||
"valueMode": "text" | ||
}, | ||
"pluginVersion": "10.0.3", | ||
"targets": [ | ||
{ | ||
"datasource": { | ||
"type": "Capten", | ||
"uid": "Capten" | ||
}, | ||
"editorMode": "code", | ||
"format": "table", | ||
"rawQuery": true, | ||
"rawSql": "SELECT count(app_name) FROM cluster_app_config", | ||
"refId": "A", | ||
"sql": { | ||
"columns": [ | ||
{ | ||
"parameters": [], | ||
"type": "function" | ||
} | ||
], | ||
"groupBy": [ | ||
{ | ||
"property": { | ||
"type": "string" | ||
}, | ||
"type": "groupBy" | ||
} | ||
], | ||
"limit": 50 | ||
} | ||
} | ||
], | ||
"title": "Count of Applications", | ||
"type": "bargauge" | ||
}, | ||
{ | ||
"datasource": { | ||
"type": "Capten", | ||
"uid": "Capten" | ||
}, | ||
"fieldConfig": { | ||
"defaults": { | ||
"color": { | ||
"mode": "palette-classic" | ||
}, | ||
"custom": { | ||
"hideFrom": { | ||
"legend": false, | ||
"tooltip": false, | ||
"viz": false | ||
} | ||
}, | ||
"mappings": [] | ||
}, | ||
"overrides": [] | ||
}, | ||
"gridPos": { | ||
"h": 8, | ||
"w": 12, | ||
"x": 11, | ||
"y": 0 | ||
}, | ||
"id": 3, | ||
"options": { | ||
"displayLabels": [ | ||
"percent" | ||
], | ||
"legend": { | ||
"displayMode": "list", | ||
"placement": "right", | ||
"showLegend": true, | ||
"values": [] | ||
}, | ||
"pieType": "pie", | ||
"reduceOptions": { | ||
"calcs": [ | ||
"lastNotNull" | ||
], | ||
"fields": "", | ||
"values": true | ||
}, | ||
"tooltip": { | ||
"mode": "single", | ||
"sort": "none" | ||
} | ||
}, | ||
"targets": [ | ||
{ | ||
"datasource": { | ||
"type": "Capten", | ||
"uid": "Capten" | ||
}, | ||
"editorMode": "code", | ||
"format": "table", | ||
"rawQuery": true, | ||
"rawSql": "SELECT namespace, count(app_name) AS Apps FROM cluster_app_config\nGROUP BY namespace\n", | ||
"refId": "A", | ||
"sql": { | ||
"columns": [ | ||
{ | ||
"parameters": [], | ||
"type": "function" | ||
} | ||
], | ||
"groupBy": [ | ||
{ | ||
"property": { | ||
"type": "string" | ||
}, | ||
"type": "groupBy" | ||
} | ||
], | ||
"limit": 50 | ||
} | ||
} | ||
], | ||
"title": "Counts of apps per namespace", | ||
"type": "piechart" | ||
}, | ||
{ | ||
"datasource": { | ||
"type": "Capten", | ||
"uid": "Capten" | ||
}, | ||
"fieldConfig": { | ||
"defaults": { | ||
"custom": { | ||
"align": "auto", | ||
"cellOptions": { | ||
"type": "auto" | ||
}, | ||
"filterable": true, | ||
"inspect": false | ||
}, | ||
"mappings": [], | ||
"thresholds": { | ||
"mode": "absolute", | ||
"steps": [ | ||
{ | ||
"color": "green", | ||
"value": null | ||
}, | ||
{ | ||
"color": "red", | ||
"value": 80 | ||
} | ||
] | ||
} | ||
}, | ||
"overrides": [ | ||
{ | ||
"matcher": { | ||
"id": "byName", | ||
"options": "install_status" | ||
}, | ||
"properties": [ | ||
{ | ||
"id": "custom.cellOptions", | ||
"value": { | ||
"type": "color-background" | ||
} | ||
}, | ||
{ | ||
"id": "mappings", | ||
"value": [ | ||
{ | ||
"options": { | ||
"Installation failed": { | ||
"color": "red", | ||
"index": 1 | ||
}, | ||
"Installed": { | ||
"color": "green", | ||
"index": 0 | ||
}, | ||
"Upgraded": { | ||
"color": "yellow", | ||
"index": 2 | ||
} | ||
}, | ||
"type": "value" | ||
} | ||
] | ||
} | ||
] | ||
} | ||
] | ||
}, | ||
"gridPos": { | ||
"h": 16, | ||
"w": 24, | ||
"x": 0, | ||
"y": 8 | ||
}, | ||
"id": 1, | ||
"options": { | ||
"cellHeight": "sm", | ||
"footer": { | ||
"countRows": false, | ||
"fields": "", | ||
"reducer": [ | ||
"sum" | ||
], | ||
"show": false | ||
}, | ||
"showHeader": true | ||
}, | ||
"pluginVersion": "10.0.3", | ||
"targets": [ | ||
{ | ||
"datasource": { | ||
"type": "Capten", | ||
"uid": "Capten" | ||
}, | ||
"editorMode": "builder", | ||
"format": "table", | ||
"key": "Q-102e33bd-125e-4526-8a90-a4dc6b6b93d8-0", | ||
"rawSql": "SELECT * FROM cluster_app_config ", | ||
"refId": "A", | ||
"sql": { | ||
"columns": [ | ||
{ | ||
"parameters": [ | ||
{ | ||
"name": "*", | ||
"type": "functionParameter" | ||
} | ||
], | ||
"type": "function" | ||
} | ||
], | ||
"groupBy": [ | ||
{ | ||
"property": { | ||
"type": "string" | ||
}, | ||
"type": "groupBy" | ||
} | ||
], | ||
"limit": 50 | ||
}, | ||
"table": "cluster_app_config" | ||
} | ||
], | ||
"title": "Cluster Applications", | ||
"transformations": [ | ||
{ | ||
"id": "organize", | ||
"options": { | ||
"excludeByName": { | ||
"api_endpoint": true, | ||
"default_app": true, | ||
"description": true, | ||
"icon": true, | ||
"install_status": false, | ||
"launch_ui_values": true, | ||
"override_values": true, | ||
"plugin_name": true, | ||
"plugin_store_type": true, | ||
"privileged_namespace": true, | ||
"repo_url": true, | ||
"template_values": true, | ||
"ui_endpoint": true, | ||
"ui_module_endpoint": true, | ||
"version": true | ||
}, | ||
"indexByName": {}, | ||
"renameByName": {} | ||
} | ||
} | ||
], | ||
"type": "table" | ||
} | ||
], | ||
"refresh": "", | ||
"schemaVersion": 38, | ||
"style": "dark", | ||
"tags": [], | ||
"templating": { | ||
"list": [] | ||
}, | ||
"time": { | ||
"from": "now-6h", | ||
"to": "now" | ||
}, | ||
"timepicker": {}, | ||
"timezone": "", | ||
"title": "Controlplane Applications", | ||
"uid": "b21dc765-36ff-4009-b99f-db8ecda80936", | ||
"version": 6, | ||
"weekStart": "" | ||
} |
Oops, something went wrong.