Skip to content

Commit

Permalink
Provide local Grafana configuration for StatsD (#1002)
Browse files Browse the repository at this point in the history
* Grafana configuration

* Basic dashboard

* Finalize config
  • Loading branch information
tomkerkhove authored Apr 30, 2020
1 parent 5f0ae39 commit 557ef4a
Show file tree
Hide file tree
Showing 6 changed files with 906 additions and 1 deletion.
144 changes: 144 additions & 0 deletions config/grafana/dashboard-config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,144 @@
{
"annotations": {
"list": [
{
"$$hashKey": "object:38",
"builtIn": 1,
"datasource": "-- Grafana --",
"enable": true,
"hide": true,
"iconColor": "rgba(0, 211, 255, 1)",
"name": "Annotations & Alerts",
"type": "dashboard"
}
]
},
"description": "Scraped metrics pushed by Promitor by using StatsD",
"editable": true,
"gnetId": null,
"graphTooltip": 0,
"links": [],
"panels": [
{
"aliasColors": {},
"bars": false,
"dashLength": 10,
"dashes": false,
"datasource": "Graphite",
"description": "Scraped metrics pushed by Promitor by using StatsD",
"fill": 1,
"fillGradient": 0,
"gridPos": {
"h": 23,
"w": 24,
"x": 0,
"y": 0
},
"hiddenSeries": false,
"id": 2,
"legend": {
"avg": false,
"current": false,
"max": false,
"min": false,
"show": true,
"total": false,
"values": false
},
"lines": true,
"linewidth": 1,
"nullPointMode": "null",
"options": {
"dataLinks": []
},
"percentage": false,
"pointradius": 2,
"points": false,
"renderer": "flot",
"seriesOverrides": [],
"spaceLength": 10,
"stack": false,
"steppedLine": false,
"targets": [
{
"refId": "A",
"target": "stats.gauges.promitor.*"
}
],
"thresholds": [],
"timeFrom": null,
"timeRegions": [],
"timeShift": null,
"title": "Metrics Overview (StatsD)",
"tooltip": {
"shared": true,
"sort": 0,
"value_type": "individual"
},
"transparent": true,
"type": "graph",
"xaxis": {
"buckets": null,
"mode": "time",
"name": null,
"show": true,
"values": []
},
"yaxes": [
{
"$$hashKey": "object:114",
"format": "short",
"label": null,
"logBase": 1,
"max": null,
"min": null,
"show": true
},
{
"$$hashKey": "object:115",
"format": "short",
"label": null,
"logBase": 1,
"max": null,
"min": null,
"show": true
}
],
"yaxis": {
"align": false,
"alignLevel": null
}
}
],
"schemaVersion": 22,
"style": "dark",
"tags": [],
"templating": {
"list": []
},
"time": {
"from": "now-5m",
"to": "now"
},
"timepicker": {
"refresh_intervals": [
"5s",
"10s",
"30s",
"1m",
"5m",
"15m",
"30m",
"1h",
"2h",
"1d"
]
},
"timezone": "",
"title": "Promitor Scraped Metrics (StatsD)",
"uid": "qes7mveZz",
"variables": {
"list": []
},
"version": 1
}
24 changes: 24 additions & 0 deletions config/grafana/dashboards.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
apiVersion: 1

providers:
# <string> an unique provider name
- name: 'Metrics'
# <int> org id. will default to orgId 1 if not specified
orgId: 1
# <string, required> name of the dashboard folder. Required
folder: 'Promitor'
# <string> folder UID. will be automatically generated if not specified
folderUid: ''
# <string, required> provider type. Required
type: file
# <bool> disable dashboard deletion
disableDeletion: false
# <bool> enable dashboard editing
editable: true
# <int> how often Grafana will scan for changed dashboards
updateIntervalSeconds: 10
# <bool> allow updating provisioned dashboards from the UI
allowUiUpdates: false
options:
# <string, required> path to dashboard files on disk. Required
path: /var/lib/grafana/dashboards
18 changes: 18 additions & 0 deletions config/grafana/datasources.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# config file version
apiVersion: 1

# list of datasources to insert/update depending
# what's available in the database
datasources:
# <string, required> name of the datasource. Required
- name: Graphite
# <string, required> datasource type. Required
type: graphite
# <string, required> access mode. proxy or direct (Server or Browser in the UI). Required
access: proxy
# <int> org id. will default to orgId 1 if not specified
orgId: 1
# <string> custom UID which can be used to reference this datasource in other parts of the configuration, if not specified will be generated automatically
uid: graphite
# <string> url
url: http://graphite
Loading

0 comments on commit 557ef4a

Please sign in to comment.