Skip to content

Commit

Permalink
grafana: Configure dashboards in json (#78)
Browse files Browse the repository at this point in the history
  • Loading branch information
leoyvens authored Aug 8, 2023
1 parent 0f0e00d commit 9110546
Show file tree
Hide file tree
Showing 8 changed files with 1,106 additions and 0 deletions.
11 changes: 11 additions & 0 deletions ops/compose/grafana/config/provisioning/dashboards/dashboards.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
apiVersion: 1

providers:
- name: 'default'
orgId: 1
folder: ''
type: file
disableDeletion: false
updateIntervalSeconds: 10
options:
path: /var/lib/grafana/dashboards
253 changes: 253 additions & 0 deletions ops/compose/grafana/dashboards/By_Deployment.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,253 @@
{
"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": "fifemon-graphql-datasource",
"uid": "gYhzyBE4k"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"hideFrom": {
"legend": false,
"tooltip": false,
"viz": false
}
},
"mappings": []
},
"overrides": [
{
"matcher": {
"id": "byName",
"options": "ca9a222b66ad276c83a0cc4d9e4f37d442556eae926f669468ebf26d2596a9f5"
},
"properties": [
{
"id": "color",
"value": {
"fixedColor": "yellow",
"mode": "fixed"
}
}
]
}
]
},
"gridPos": {
"h": 10,
"w": 24,
"x": 0,
"y": 0
},
"id": 1,
"options": {
"displayLabels": [],
"legend": {
"displayMode": "list",
"placement": "bottom",
"showLegend": true,
"values": []
},
"pieType": "pie",
"reduceOptions": {
"calcs": [
"count"
],
"fields": "/^indexer\\.id \\(distinctCount\\)$/",
"values": true
},
"tooltip": {
"mode": "single",
"sort": "none"
}
},
"pluginVersion": "9.5.2",
"targets": [
{
"aliasBy": "",
"annotationTags": "",
"annotationText": "",
"annotationTitle": "",
"constant": 6.5,
"dataPath": "liveProofsOfIndexing",
"datasource": {
"type": "fifemon-graphql-datasource",
"uid": "gYhzyBE4k"
},
"endTimePath": "endTime",
"groupBy": "",
"hide": false,
"queryText": "{\n liveProofsOfIndexing(request: { deployments: [\"$deployment\"] }) {\n hash\n indexer {\n id\n }\n }\n}",
"refId": "A",
"timePath": ""
}
],
"title": "PoI fragmentation",
"transformations": [
{
"id": "groupBy",
"options": {
"fields": {
"hash": {
"aggregations": [],
"operation": "groupby"
},
"hash (firstNotNull)": {
"aggregations": [],
"operation": "groupby"
},
"indexer.id": {
"aggregations": [
"distinctCount"
],
"operation": "aggregate"
}
}
}
}
],
"type": "piechart"
},
{
"datasource": {
"type": "fifemon-graphql-datasource",
"uid": "gYhzyBE4k"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "thresholds"
},
"custom": {
"align": "left",
"cellOptions": {
"type": "auto"
},
"inspect": false
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
}
},
"overrides": []
},
"gridPos": {
"h": 7,
"w": 24,
"x": 0,
"y": 10
},
"id": 2,
"options": {
"cellHeight": "sm",
"footer": {
"countRows": false,
"fields": "",
"reducer": [
"sum"
],
"show": false
},
"showHeader": true
},
"pluginVersion": "9.5.2",
"targets": [
{
"aliasBy": "",
"annotationTags": "",
"annotationText": "",
"annotationTitle": "",
"constant": 6.5,
"dataPath": "liveProofsOfIndexing",
"datasource": {
"type": "fifemon-graphql-datasource",
"uid": "gYhzyBE4k"
},
"endTimePath": "endTime",
"groupBy": "",
"queryText": "{\n liveProofsOfIndexing(request: { deployments: [\"$deployment\"] }) {\n indexer {\n id\n }\n block {\n number\n }\n hash\n }\n}",
"refId": "A",
"timePath": ""
}
],
"title": "Live PoIs",
"type": "table"
}
],
"refresh": "",
"schemaVersion": 38,
"style": "dark",
"tags": [],
"templating": {
"list": [
{
"current": {
"selected": false,
"text": "",
"value": ""
},
"description": "Deployment ID (e.g. Qm...)",
"hide": 0,
"label": "Deployment ID",
"name": "deployment",
"options": [
{
"selected": false,
"text": "",
"value": ""
}
],
"query": "",
"skipUrlSync": false,
"type": "textbox"
}
]
},
"time": {
"from": "now-6h",
"to": "now"
},
"timepicker": {},
"timezone": "",
"title": "By Deployment",
"uid": "c76a3ad9-175c-4ac7-874b-901cd316a2a3",
"version": 10,
"weekStart": ""
}
Loading

0 comments on commit 9110546

Please sign in to comment.