-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Arnaud DEMARCQ
authored and
Arnaud DEMARCQ
committed
Jan 10, 2025
1 parent
e0b517d
commit c8f0621
Showing
2 changed files
with
346 additions
and
0 deletions.
There are no files selected for viewing
11 changes: 11 additions & 0 deletions
11
prometheus_poc/grafana_provisioning/dashboards/default.yml
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,11 @@ | ||
apiVersion: 1 | ||
|
||
providers: | ||
- name: 'POC Dashboards' | ||
orgId: 1 | ||
folder: 'Service' | ||
folderUid: '' | ||
type: file | ||
updateIntervalSeconds: 10 | ||
options: | ||
path: /etc/grafana/provisioning/dashboards |
335 changes: 335 additions & 0 deletions
335
prometheus_poc/grafana_provisioning/dashboards/example.json
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,335 @@ | ||
{ | ||
"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": 1, | ||
"links": [], | ||
"panels": [ | ||
{ | ||
"datasource": { | ||
"type": "prometheus", | ||
"uid": "PBFA97CFB590B2093" | ||
}, | ||
"fieldConfig": { | ||
"defaults": { | ||
"color": { | ||
"mode": "palette-classic" | ||
}, | ||
"custom": { | ||
"axisBorderShow": false, | ||
"axisCenteredZero": false, | ||
"axisColorMode": "text", | ||
"axisLabel": "", | ||
"axisPlacement": "auto", | ||
"barAlignment": 0, | ||
"barWidthFactor": 0.6, | ||
"drawStyle": "line", | ||
"fillOpacity": 0, | ||
"gradientMode": "none", | ||
"hideFrom": { | ||
"legend": false, | ||
"tooltip": false, | ||
"viz": false | ||
}, | ||
"insertNulls": false, | ||
"lineInterpolation": "linear", | ||
"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 | ||
} | ||
] | ||
} | ||
}, | ||
"overrides": [] | ||
}, | ||
"gridPos": { | ||
"h": 8, | ||
"w": 24, | ||
"x": 0, | ||
"y": 0 | ||
}, | ||
"id": 2, | ||
"options": { | ||
"legend": { | ||
"calcs": [], | ||
"displayMode": "list", | ||
"placement": "bottom", | ||
"showLegend": true | ||
}, | ||
"tooltip": { | ||
"mode": "single", | ||
"sort": "none" | ||
} | ||
}, | ||
"pluginVersion": "11.3.1", | ||
"targets": [ | ||
{ | ||
"datasource": { | ||
"type": "prometheus", | ||
"uid": "PBFA97CFB590B2093" | ||
}, | ||
"editorMode": "code", | ||
"exemplar": false, | ||
"expr": "sum by (date,facility) (test_data_metric)", | ||
"format": "table", | ||
"instant": true, | ||
"legendFormat": "", | ||
"range": false, | ||
"refId": "A" | ||
} | ||
], | ||
"title": "Panel Title", | ||
"transformations": [ | ||
{ | ||
"id": "convertFieldType", | ||
"options": { | ||
"conversions": [ | ||
{ | ||
"dateFormat": "YYYY-MM-DD", | ||
"destinationType": "time", | ||
"targetField": "date" | ||
} | ||
], | ||
"fields": {} | ||
} | ||
}, | ||
{ | ||
"id": "organize", | ||
"options": { | ||
"excludeByName": { | ||
"Time": true, | ||
"__name__": true | ||
}, | ||
"includeByName": {}, | ||
"indexByName": { | ||
"Time": 0, | ||
"Value": 8, | ||
"__name__": 2, | ||
"date": 1, | ||
"facility": 3, | ||
"instance": 4, | ||
"job": 5, | ||
"refdate": 6, | ||
"testLabelKey": 7 | ||
}, | ||
"renameByName": { | ||
"Time": "Time_OLD", | ||
"date": "Time" | ||
} | ||
} | ||
}, | ||
{ | ||
"id": "partitionByValues", | ||
"options": { | ||
"fields": [ | ||
"facility" | ||
], | ||
"keepFields": false, | ||
"naming": { | ||
"asLabels": true | ||
} | ||
} | ||
} | ||
], | ||
"type": "timeseries" | ||
}, | ||
{ | ||
"datasource": { | ||
"type": "prometheus", | ||
"uid": "PBFA97CFB590B2093" | ||
}, | ||
"fieldConfig": { | ||
"defaults": { | ||
"color": { | ||
"mode": "palette-classic" | ||
}, | ||
"custom": { | ||
"axisBorderShow": false, | ||
"axisCenteredZero": false, | ||
"axisColorMode": "text", | ||
"axisLabel": "", | ||
"axisPlacement": "auto", | ||
"barAlignment": 0, | ||
"barWidthFactor": 0.6, | ||
"drawStyle": "line", | ||
"fillOpacity": 0, | ||
"gradientMode": "none", | ||
"hideFrom": { | ||
"legend": false, | ||
"tooltip": false, | ||
"viz": false | ||
}, | ||
"insertNulls": false, | ||
"lineInterpolation": "smooth", | ||
"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 | ||
} | ||
] | ||
} | ||
}, | ||
"overrides": [] | ||
}, | ||
"gridPos": { | ||
"h": 8, | ||
"w": 24, | ||
"x": 0, | ||
"y": 8 | ||
}, | ||
"id": 1, | ||
"options": { | ||
"legend": { | ||
"calcs": [], | ||
"displayMode": "list", | ||
"placement": "bottom", | ||
"showLegend": true | ||
}, | ||
"tooltip": { | ||
"mode": "single", | ||
"sort": "none" | ||
} | ||
}, | ||
"pluginVersion": "11.3.1", | ||
"targets": [ | ||
{ | ||
"datasource": { | ||
"type": "prometheus", | ||
"uid": "PBFA97CFB590B2093" | ||
}, | ||
"editorMode": "code", | ||
"exemplar": false, | ||
"expr": "sum by (date,facility) (test_data_metric)", | ||
"format": "table", | ||
"instant": true, | ||
"legendFormat": "__auto", | ||
"range": false, | ||
"refId": "A" | ||
} | ||
], | ||
"title": "Panel Title", | ||
"transformations": [ | ||
{ | ||
"id": "convertFieldType", | ||
"options": { | ||
"conversions": [ | ||
{ | ||
"dateFormat": "YYYY-MM-DD", | ||
"destinationType": "time", | ||
"targetField": "date" | ||
} | ||
], | ||
"fields": {} | ||
} | ||
}, | ||
{ | ||
"id": "organize", | ||
"options": { | ||
"excludeByName": { | ||
"Time": true, | ||
"__name__": true | ||
}, | ||
"includeByName": {}, | ||
"indexByName": { | ||
"Time": 0, | ||
"Value": 8, | ||
"__name__": 2, | ||
"date": 1, | ||
"facility": 3, | ||
"instance": 4, | ||
"job": 5, | ||
"refdate": 6, | ||
"testLabelKey": 7 | ||
}, | ||
"renameByName": { | ||
"Time": "Time_OLD", | ||
"date": "Time" | ||
} | ||
} | ||
}, | ||
{ | ||
"id": "partitionByValues", | ||
"options": { | ||
"fields": [ | ||
"facility" | ||
], | ||
"keepFields": false, | ||
"naming": { | ||
"asLabels": true | ||
} | ||
} | ||
} | ||
], | ||
"type": "timeseries" | ||
} | ||
], | ||
"preload": false, | ||
"schemaVersion": 40, | ||
"tags": [], | ||
"templating": { | ||
"list": [] | ||
}, | ||
"time": { | ||
"from": "now-5y", | ||
"to": "now" | ||
}, | ||
"timepicker": {}, | ||
"timezone": "browser", | ||
"title": "Example Dashboard", | ||
"uid": "be5pjbvzn1atcf", | ||
"version": 16, | ||
"weekStart": "" | ||
} |