Skip to content

Commit

Permalink
config:Added gitbridge & containerbridge dashboards
Browse files Browse the repository at this point in the history
  • Loading branch information
akash4sh committed Jul 19, 2023
1 parent 60f3e86 commit 458c70f
Show file tree
Hide file tree
Showing 3 changed files with 164 additions and 75 deletions.
2 changes: 1 addition & 1 deletion charts/client/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 0.2.2
version: 0.2.3

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,128 @@
{{- if .Values.dashboards.enabled }}
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ include "client.fullname" . }}-containerbridge-dockerhub-dashboard
labels:
{{ .Values.dashboards.label }}: {{ .Values.dashboards.labelValue | quote }}
data:
dockerhub.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,
"graphTooltip": 0,
"id": 5,
"links": [],
"liveNow": false,
"panels": [
{
"datasource": {
"type": "vertamedia-clickhouse-datasource",
"uid": "{{ .Values.datasources.uid }}"
},
"description": "This panel displays all the dockerhub webhook events",
"fieldConfig": {
"defaults": {
"color": {
"mode": "thresholds"
},
"custom": {
"align": "center",
"displayMode": "color-text",
"filterable": true
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
}
},
"overrides": []
},
"gridPos": {
"h": 15,
"w": 24,
"x": 0,
"y": 0
},
"id": 2,
"options": {
"footer": {
"fields": "",
"reducer": [
"sum"
],
"show": false
},
"showHeader": true
},
"pluginVersion": "8.4.6",
"targets": [
{
"datasource": {
"type": "vertamedia-clickhouse-datasource",
"uid": "{{ .Values.datasources.uid }}"
},
"dateTimeType": "DATETIME",
"extrapolate": true,
"format": "table",
"formattedQuery": "SELECT $timeSeries as t, count() FROM $table WHERE $timeFilter GROUP BY t ORDER BY t",
"intervalFactor": 1,
"query": "SELECT * FROM default.dockerhubbuild",
"rawQuery": "SELECT * FROM default.dockerhubbuild",
"refId": "A",
"round": "0s",
"skip_comments": true
}
],
"title": "Container Dockerhub",
"transparent": true,
"type": "table"
}
],
"schemaVersion": 35,
"style": "dark",
"tags": [],
"templating": {
"list": []
},
"time": {
"from": "now-6h",
"to": "now"
},
"timepicker": {},
"timezone": "",
"title": "Container Dockerhub",
"uid": "rY_9CwCVk",
"version": 1,
"weekStart": ""
}
{{- end }}
109 changes: 35 additions & 74 deletions charts/client/templates/configmap-gitbridge-dashboard.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,80 +8,55 @@ metadata:
data:
gitbridge.json: |-
{
"__inputs": [
{
"name": "DS_CLICKHOUSE",
"label": "ClickHouse",
"description": "",
"type": "datasource",
"pluginId": "grafana-clickhouse-datasource",
"pluginName": "ClickHouse"
}
],
"__elements": {},
"__requires": [
{
"type": "grafana",
"id": "grafana",
"name": "Grafana",
"version": "9.3.2"
},
{
"type": "datasource",
"id": "grafana-clickhouse-datasource",
"name": "ClickHouse",
"version": "3.1.0"
},
{
"type": "panel",
"id": "table",
"name": "Table",
"version": ""
}
],
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": {
"type": "grafana",
"uid": "-- Grafana --"
},
"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,
"graphTooltip": 0,
"id": null,
"links": [],
"id": 3,
"links": [
{
"asDropdown": false,
"icon": "external link",
"includeVars": false,
"keepTime": false,
"tags": [],
"targetBlank": true,
"title": "JSON Formatter",
"tooltip": "",
"type": "link",
"url": "https://jsonformatter.org/"
}
],
"liveNow": false,
"panels": [
{
"datasource": {
"type": "grafana-clickhouse-datasource",
"uid": "grafana-clickhouse-datasource"
"uid": "ClickHouse"
},
"description": "This panel displays all the git metrics and provider details.",
"description": "This panel displays all the Git metrics and its providers.",
"fieldConfig": {
"defaults": {
"color": {
"mode": "thresholds"
},
"custom": {
"align": "center",
"displayMode": "color-text",
"cellOptions": {
"type": "color-text"
},
"filterable": true,
"inspect": false
},
Expand All @@ -103,14 +78,16 @@ data:
"overrides": []
},
"gridPos": {
"h": 17,
"h": 15,
"w": 24,
"x": 0,
"y": 0
},
"id": 2,
"id": 1,
"options": {
"cellHeight": "sm",
"footer": {
"countRows": false,
"fields": "",
"reducer": [
"sum"
Expand All @@ -119,50 +96,34 @@ data:
},
"showHeader": true
},
"pluginVersion": "9.3.2",
"pluginVersion": "10.0.1",
"targets": [
{
"builderOptions": {
"database": "default",
"fields": [
"event"
],
"filters": [],
"limit": 100,
"mode": "list",
"orderBy": [],
"table": "git_json"
},
"datasource": {
"type": "grafana-clickhouse-datasource",
"uid": "grafana-clickhouse-datasource"
"uid": "ClickHouse"
},
"format": 1,
"meta": {
"builderOptions": {
"database": "default",
"fields": [
"event"
],
"filters": [],
"fields": [],
"limit": 100,
"mode": "list",
"orderBy": [],
"table": "git_json"
"mode": "list"
}
},
"queryType": "sql",
"rawSql": "select event.metrics as METRICS,\nevent.repo as GITPROVIDER\nfrom default.git_json SETTINGS describe_extend_object_types=1;",
"rawSql": "SELECT event.metrics.commits.timestamp AS TimeStamp,\nevent.metrics.commits.id AS Id,\nevent.metrics.commits.url AS Url,\nevent.metrics.object_kind AS Action,\nevent.repo AS GitProvider,\nevent AS MetaData\nFROM default.git_json",
"refId": "A",
"selectedFormat": 1
}
],
"title": "GitBridge",
"title": "Git Bridge",
"transparent": true,
"type": "table"
}
],
"schemaVersion": 37,
"refresh": "",
"schemaVersion": 38,
"style": "dark",
"tags": [],
"templating": {
Expand All @@ -174,8 +135,8 @@ data:
},
"timepicker": {},
"timezone": "",
"title": "GitBridge",
"uid": "kYtOul94k",
"title": "Git Bridge",
"uid": "a1885f0a-0f8a-42f5-a4b9-5ac7f2665bc4",
"version": 1,
"weekStart": ""
}
Expand Down

0 comments on commit 458c70f

Please sign in to comment.