1
0
Fork 0

Merge pull request #24 from thouveng/add_grafana_dashboard

Add a Grafana dashboard
This commit is contained in:
pasquier-s 2017-01-17 11:45:47 +01:00 committed by GitHub
commit 4dab23a099
2 changed files with 690 additions and 0 deletions

View File

@ -0,0 +1,687 @@
{
"annotations": {
"list": []
},
"editable": true,
"gnetId": null,
"hideControls": false,
"id": null,
"links": [],
"refresh": "1m",
"rows": [
{
"collapse": false,
"height": "250px",
"panels": [
{
"cacheTimeout": null,
"colorBackground": false,
"colorValue": false,
"colors": [
"rgba(245, 54, 54, 0.9)",
"rgba(237, 129, 40, 0.89)",
"rgba(50, 172, 45, 0.97)"
],
"datasource": null,
"editable": true,
"error": false,
"format": "none",
"gauge": {
"maxValue": 100,
"minValue": 0,
"show": false,
"thresholdLabels": false,
"thresholdMarkers": true
},
"id": 14,
"interval": "> 60s",
"links": [],
"mappingType": 1,
"mappingTypes": [
{
"name": "value to text",
"value": 1
},
{
"name": "range to text",
"value": 2
}
],
"maxDataPoints": 100,
"nullPointMode": "connected",
"nullText": null,
"postfix": "",
"postfixFontSize": "50%",
"prefix": "",
"prefixFontSize": "50%",
"rangeMaps": [
{
"from": "null",
"text": "N/A",
"to": "null"
}
],
"span": 2,
"sparkline": {
"fillColor": "rgba(31, 118, 189, 0.18)",
"full": false,
"lineColor": "rgb(31, 120, 193)",
"show": true
},
"targets": [
{
"column": "value",
"dsType": "influxdb",
"function": "last",
"groupBy": [
{
"params": [
"auto"
],
"type": "time"
}
],
"measurement": "lma_components_threads",
"policy": "default",
"query": "SELECT last(\"value\") FROM \"lma_components_threads\" WHERE \"service\" = 'grafana-server' AND \"hostname\" =~ /$server$/ AND $timeFilter GROUP BY time($interval)",
"refId": "A",
"resultFormat": "time_series",
"select": [
[
{
"params": [
"value"
],
"type": "field"
},
{
"params": [],
"type": "last"
}
]
],
"tags": [
{
"key": "service",
"operator": "=",
"value": "grafana-server"
},
{
"condition": "AND",
"key": "hostname",
"operator": "=~",
"value": "/$server$/"
}
]
}
],
"thresholds": "",
"title": "Threads",
"type": "singlestat",
"valueFontSize": "80%",
"valueMaps": [
{
"op": "=",
"text": "N/A",
"value": "null"
}
],
"valueName": "current"
},
{
"aliasColors": {},
"bars": false,
"datasource": null,
"editable": true,
"error": false,
"fill": 0,
"grid": {},
"id": 15,
"interval": "> 60s",
"legend": {
"alignAsTable": false,
"avg": false,
"current": true,
"max": true,
"min": true,
"show": false,
"total": false,
"values": false
},
"lines": true,
"linewidth": 1,
"links": [],
"nullPointMode": "connected",
"percentage": false,
"pointradius": 5,
"points": false,
"renderer": "flot",
"seriesOverrides": [],
"span": 3,
"stack": false,
"steppedLine": false,
"targets": [
{
"alias": "rss",
"column": "value",
"dsType": "influxdb",
"function": "mean",
"groupBy": [
{
"params": [
"auto"
],
"type": "time"
},
{
"params": [
"0"
],
"type": "fill"
}
],
"measurement": "lma_components_memory_rss",
"policy": "default",
"query": "SELECT mean(\"value\") FROM \"lma_components_memory_rss\" WHERE \"service\" = 'grafana-server' AND \"hostname\" =~ /$server$/ AND $timeFilter GROUP BY time($interval) fill(0)",
"refId": "A",
"resultFormat": "time_series",
"select": [
[
{
"params": [
"value"
],
"type": "field"
},
{
"params": [],
"type": "mean"
}
]
],
"tags": [
{
"key": "service",
"operator": "=",
"value": "grafana-server"
},
{
"condition": "AND",
"key": "hostname",
"operator": "=~",
"value": "/$server$/"
}
]
}
],
"thresholds": [],
"timeFrom": null,
"timeShift": null,
"title": "Resident Set Size",
"tooltip": {
"msResolution": false,
"shared": true,
"sort": 0,
"value_type": "cumulative"
},
"type": "graph",
"xaxis": {
"mode": "time",
"name": null,
"show": true,
"values": []
},
"yaxes": [
{
"format": "bytes",
"logBase": 1,
"max": null,
"min": 0,
"show": true
},
{
"format": "short",
"logBase": 1,
"max": null,
"min": null,
"show": true
}
]
},
{
"aliasColors": {},
"bars": false,
"datasource": null,
"editable": true,
"error": false,
"fill": 0,
"grid": {},
"id": 16,
"interval": "> 60s",
"legend": {
"alignAsTable": false,
"avg": false,
"current": true,
"max": true,
"min": true,
"show": true,
"total": false,
"values": false
},
"lines": true,
"linewidth": 1,
"links": [],
"nullPointMode": "connected",
"percentage": false,
"pointradius": 5,
"points": false,
"renderer": "flot",
"seriesOverrides": [],
"span": 3,
"stack": false,
"steppedLine": false,
"targets": [
{
"alias": "read",
"column": "value",
"dsType": "influxdb",
"function": "mean",
"groupBy": [
{
"params": [
"auto"
],
"type": "time"
},
{
"params": [
"0"
],
"type": "fill"
}
],
"measurement": "lma_components_disk_bytes_read",
"policy": "default",
"query": "SELECT mean(\"value\") FROM \"lma_components_disk_bytes_read\" WHERE \"service\" = 'grafana-server' AND \"hostname\" =~ /$server$/ AND $timeFilter GROUP BY time($interval) fill(0)",
"refId": "A",
"resultFormat": "time_series",
"select": [
[
{
"params": [
"value"
],
"type": "field"
},
{
"params": [],
"type": "mean"
}
]
],
"tags": [
{
"key": "service",
"operator": "=",
"value": "grafana-server"
},
{
"condition": "AND",
"key": "hostname",
"operator": "=~",
"value": "/$server$/"
}
]
},
{
"alias": "write",
"column": "value",
"dsType": "influxdb",
"function": "mean",
"groupBy": [
{
"params": [
"auto"
],
"type": "time"
},
{
"params": [
"0"
],
"type": "fill"
}
],
"measurement": "lma_components_disk_bytes_write",
"policy": "default",
"query": "SELECT mean(\"value\") FROM \"lma_components_disk_bytes_write\" WHERE \"service\" = 'grafana-server' AND \"hostname\" =~ /$server$/ AND $timeFilter GROUP BY time($interval) fill(0)",
"refId": "B",
"resultFormat": "time_series",
"select": [
[
{
"params": [
"value"
],
"type": "field"
},
{
"params": [],
"type": "mean"
}
]
],
"tags": [
{
"key": "service",
"operator": "=",
"value": "grafana-server"
},
{
"condition": "AND",
"key": "hostname",
"operator": "=~",
"value": "/$server$/"
}
]
}
],
"thresholds": [],
"timeFrom": null,
"timeShift": null,
"title": "Disk I/O",
"tooltip": {
"msResolution": false,
"shared": true,
"sort": 0,
"value_type": "cumulative"
},
"type": "graph",
"xaxis": {
"mode": "time",
"name": null,
"show": true,
"values": []
},
"yaxes": [
{
"format": "bytes",
"label": "bytes/sec",
"logBase": 1,
"max": null,
"min": 0,
"show": true
},
{
"format": "short",
"logBase": 1,
"max": null,
"min": null,
"show": true
}
]
},
{
"aliasColors": {},
"bars": false,
"datasource": null,
"editable": true,
"error": false,
"fill": 1,
"grid": {},
"id": 17,
"interval": "> 60s",
"legend": {
"avg": false,
"current": false,
"max": false,
"min": false,
"show": true,
"total": false,
"values": false
},
"lines": true,
"linewidth": 1,
"links": [],
"nullPointMode": "connected",
"percentage": false,
"pointradius": 5,
"points": false,
"renderer": "flot",
"seriesOverrides": [],
"span": 4,
"stack": true,
"steppedLine": false,
"targets": [
{
"alias": "system",
"column": "value",
"dsType": "influxdb",
"function": "mean",
"groupBy": [
{
"params": [
"auto"
],
"type": "time"
},
{
"params": [
"0"
],
"type": "fill"
}
],
"measurement": "lma_components_cputime_syst",
"policy": "default",
"query": "SELECT mean(\"value\") FROM \"lma_components_cputime_syst\" WHERE \"service\" = 'grafana-server' AND \"hostname\" =~ /$server$/ AND $timeFilter GROUP BY time($interval) fill(0)",
"refId": "A",
"resultFormat": "time_series",
"select": [
[
{
"params": [
"value"
],
"type": "field"
},
{
"params": [],
"type": "mean"
}
]
],
"tags": [
{
"key": "service",
"operator": "=",
"value": "grafana-server"
},
{
"condition": "AND",
"key": "hostname",
"operator": "=~",
"value": "/$server$/"
}
]
},
{
"alias": "user",
"column": "value",
"dsType": "influxdb",
"function": "mean",
"groupBy": [
{
"params": [
"auto"
],
"type": "time"
},
{
"params": [
"0"
],
"type": "fill"
}
],
"measurement": "lma_components_cputime_user",
"policy": "default",
"query": "SELECT mean(\"value\") FROM \"lma_components_cputime_user\" WHERE \"service\" = 'grafana-server' AND \"hostname\" =~ /$server$/ AND $timeFilter GROUP BY time($interval) fill(0)",
"refId": "B",
"resultFormat": "time_series",
"select": [
[
{
"params": [
"value"
],
"type": "field"
},
{
"params": [],
"type": "mean"
}
]
],
"tags": [
{
"key": "service",
"operator": "=",
"value": "grafana-server"
},
{
"condition": "AND",
"key": "hostname",
"operator": "=~",
"value": "/$server$/"
}
]
}
],
"thresholds": [],
"timeFrom": null,
"timeShift": null,
"title": "CPU usage",
"tooltip": {
"msResolution": false,
"shared": true,
"sort": 0,
"value_type": "individual"
},
"type": "graph",
"xaxis": {
"mode": "time",
"name": null,
"show": true,
"values": []
},
"yaxes": [
{
"format": "percent",
"logBase": 1,
"max": null,
"min": 0,
"show": true
},
{
"format": "short",
"logBase": 1,
"max": null,
"min": null,
"show": true
}
]
}
],
"repeat": null,
"repeatIteration": null,
"repeatRowId": null,
"showTitle": true,
"title": "Grafana",
"titleSize": "h6"
}
],
"schemaVersion": 13,
"sharedCrosshair": true,
"style": "dark",
"tags": [],
"templating": {
"list": [
{
"allFormat": "glob",
"allValue": null,
"current": {},
"datasource": null,
"hide": 0,
"includeAll": false,
"label": null,
"multi": false,
"multiFormat": "glob",
"name": "environment",
"options": [],
"query": "show tag values from cpu_idle with key = environment_label",
"refresh": 1,
"refresh_on_load": true,
"regex": "",
"sort": 0,
"tagValuesQuery": null,
"tagsQuery": null,
"type": "query"
},
{
"allFormat": "glob",
"allValue": null,
"current": {},
"datasource": null,
"hide": 0,
"includeAll": false,
"label": null,
"multi": false,
"multiFormat": "glob",
"name": "server",
"options": [],
"query": "show tag values from lma_components_processes with key=\"hostname\" where service='grafana-server' and environment_label =~ /^$environment$/ ",
"refresh": 1,
"refresh_on_load": true,
"regex": "",
"sort": 0,
"tagValuesQuery": null,
"tagsQuery": null,
"type": "query"
}
]
},
"time": {
"from": "now-1h",
"to": "now"
},
"timepicker": {
"now": true,
"refresh_intervals": [
"5s",
"10s",
"30s",
"1m",
"5m",
"15m",
"30m",
"1h",
"2h",
"1d"
],
"time_options": [
"5m",
"15m",
"1h",
"6h",
"12h",
"24h",
"2d",
"7d",
"30d"
]
},
"timezone": "browser",
"title": "Grafana",
"version": 1
}

View File

@ -1,4 +1,7 @@
dashboard: dashboard:
grafana:
format: json
template: grafana/files/grafana_dashboards/grafana_influxdb.json
main: main:
format: json format: json
template: grafana/files/grafana_dashboards/main_influxdb.json template: grafana/files/grafana_dashboards/main_influxdb.json