Created
March 28, 2014 05:49
-
-
Save defp/9826178 to your computer and use it in GitHub Desktop.
Grafana config for https://github.com/PinIdea/go-metrics-influxdb
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
/** @scratch /configuration/config.js/1 | |
* == Configuration | |
* config.js is where you will find the core Grafana configuration. This file contains parameter that | |
* must be set before Grafana is run for the first time. | |
*/ | |
define(['settings'], | |
function (Settings) { | |
"use strict"; | |
return new Settings({ | |
/** | |
* elasticsearch url: | |
* For Basic authentication use: http://username:password@domain.com:9200 | |
*/ | |
// elasticsearch: "http://"+window.location.hostname+":9200", | |
/** | |
* graphite-web url: | |
* For Basic authentication use: http://username:password@domain.com | |
* Basic authentication requires special HTTP headers to be configured | |
* in nginx or apache for cross origin domain sharing to work (CORS). | |
* Check install documentation on github | |
*/ | |
// graphiteUrl: "http://"+window.location.hostname+":8080", | |
/** | |
* Multiple graphite servers? Comment out graphiteUrl and replace with | |
* | |
* datasources: { | |
* data_center_us: { type: 'graphite', url: 'http://<graphite_url>', default: true }, | |
* data_center_eu: { type: 'graphite', url: 'http://<graphite_url>' } | |
* } | |
*/ | |
default_route: '/dashboard/file/default.json', | |
/** | |
* If your graphite server has another timezone than you & users browsers specify the offset here | |
* Example: "-0500" (for UTC - 5 hours) | |
*/ | |
timezoneOffset: null, | |
datasources: { | |
influx: { | |
default: true, | |
type: 'influxdb', | |
url: 'http://127.0.0.1:8086/db/metrics', | |
username: 'root', | |
password: 'root', | |
} | |
}, | |
grafana_index: "grafana-dash", | |
panel_names: [ | |
'text', | |
'influxdb' | |
] | |
}); | |
}); |
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
{ | |
"title": "Go Monitor", | |
"services": { | |
"filter": { | |
"list": [], | |
"time": { | |
"from": "now-5m", | |
"to": "now" | |
} | |
} | |
}, | |
"rows": [ | |
{ | |
"title": "Welcome to Grafana", | |
"height": "250px", | |
"editable": true, | |
"collapse": false, | |
"collapsable": true, | |
"panels": [ | |
{ | |
"span": 4, | |
"editable": true, | |
"type": "graphite", | |
"x-axis": true, | |
"y-axis": true, | |
"scale": 1, | |
"y_formats": [ | |
"short", | |
"short" | |
], | |
"grid": { | |
"max": null, | |
"min": 0, | |
"threshold1": null, | |
"threshold2": null, | |
"threshold1Color": "rgba(216, 200, 27, 0.27)", | |
"threshold2Color": "rgba(234, 112, 112, 0.22)" | |
}, | |
"resolution": 100, | |
"lines": true, | |
"fill": 1, | |
"linewidth": 2, | |
"points": false, | |
"pointradius": 5, | |
"bars": false, | |
"stack": true, | |
"spyable": true, | |
"options": false, | |
"legend": { | |
"show": true, | |
"values": true, | |
"min": true, | |
"max": true, | |
"current": true, | |
"total": false, | |
"avg": false | |
}, | |
"interactive": true, | |
"legend_counts": true, | |
"timezone": "browser", | |
"percentage": false, | |
"zerofill": true, | |
"nullPointMode": "connected", | |
"steppedLine": false, | |
"tooltip": { | |
"value_type": "cumulative", | |
"query_as_alias": true | |
}, | |
"targets": [ | |
{ | |
"target": "randomWalk('random walk')", | |
"function": "mode", | |
"series": "runtime.memory.heap.objects", | |
"column": "value", | |
"interval": "1s" | |
} | |
], | |
"aliasColors": { | |
"runtime.memory.allocated.mode": "#E24D42", | |
"runtime.memory.heap.objects.mode": "#6ED0E0" | |
}, | |
"aliasYAxis": {}, | |
"title": "对象数(objects)", | |
"datasource": null, | |
"renderer": "flot", | |
"annotate": { | |
"enable": false | |
}, | |
"leftYAxisLabel": "MB" | |
}, | |
{ | |
"span": 4, | |
"editable": true, | |
"type": "graphite", | |
"x-axis": true, | |
"y-axis": true, | |
"scale": 1, | |
"y_formats": [ | |
"bytes", | |
"short" | |
], | |
"grid": { | |
"max": null, | |
"min": 0, | |
"threshold1": null, | |
"threshold2": null, | |
"threshold1Color": "rgba(216, 200, 27, 0.27)", | |
"threshold2Color": "rgba(234, 112, 112, 0.22)" | |
}, | |
"resolution": 100, | |
"lines": true, | |
"fill": 1, | |
"linewidth": 2, | |
"points": false, | |
"pointradius": 5, | |
"bars": false, | |
"stack": true, | |
"spyable": true, | |
"options": false, | |
"legend": { | |
"show": true, | |
"values": true, | |
"min": true, | |
"max": true, | |
"current": true, | |
"total": false, | |
"avg": false | |
}, | |
"interactive": true, | |
"legend_counts": true, | |
"timezone": "browser", | |
"percentage": false, | |
"zerofill": true, | |
"nullPointMode": "connected", | |
"steppedLine": false, | |
"tooltip": { | |
"value_type": "cumulative", | |
"query_as_alias": true | |
}, | |
"targets": [ | |
{ | |
"target": "randomWalk('random walk')", | |
"function": "mode", | |
"series": "runtime.memory.allocated", | |
"column": "value", | |
"interval": "1s" | |
} | |
], | |
"aliasColors": { | |
"runtime.memory.allocated.mode": "#E24D42" | |
}, | |
"aliasYAxis": {}, | |
"title": "内存使用(Alloc)", | |
"datasource": null, | |
"renderer": "flot", | |
"annotate": { | |
"enable": false | |
}, | |
"leftYAxisLabel": "MB", | |
"rightYAxisLabel": "" | |
}, | |
{ | |
"span": 4, | |
"editable": true, | |
"type": "graphite", | |
"x-axis": true, | |
"y-axis": true, | |
"scale": 1, | |
"y_formats": [ | |
"short", | |
"short" | |
], | |
"grid": { | |
"max": null, | |
"min": 0, | |
"threshold1": null, | |
"threshold2": null, | |
"threshold1Color": "rgba(216, 200, 27, 0.27)", | |
"threshold2Color": "rgba(234, 112, 112, 0.22)" | |
}, | |
"resolution": 100, | |
"lines": true, | |
"fill": 1, | |
"linewidth": 2, | |
"points": false, | |
"pointradius": 5, | |
"bars": false, | |
"stack": true, | |
"spyable": true, | |
"options": false, | |
"legend": { | |
"show": true, | |
"values": true, | |
"min": true, | |
"max": true, | |
"current": true, | |
"total": false, | |
"avg": false | |
}, | |
"interactive": true, | |
"legend_counts": true, | |
"timezone": "browser", | |
"percentage": false, | |
"zerofill": true, | |
"nullPointMode": "connected", | |
"steppedLine": false, | |
"tooltip": { | |
"value_type": "cumulative", | |
"query_as_alias": true | |
}, | |
"targets": [ | |
{ | |
"target": "randomWalk('random walk')", | |
"function": "mode", | |
"series": "runtime.goroutines", | |
"column": "value", | |
"interval": "1s" | |
} | |
], | |
"aliasColors": { | |
"runtime.memory.allocated.mode": "#E24D42", | |
"runtime.goroutines.mode": "#CCA300" | |
}, | |
"aliasYAxis": {}, | |
"title": "goroutine数量", | |
"datasource": null, | |
"renderer": "flot", | |
"annotate": { | |
"enable": false | |
}, | |
"leftYAxisLabel": "MB" | |
} | |
], | |
"notice": false | |
}, | |
{ | |
"title": "test", | |
"height": "250px", | |
"editable": true, | |
"collapse": false, | |
"collapsable": true, | |
"panels": [ | |
{ | |
"span": 4, | |
"editable": true, | |
"type": "graphite", | |
"x-axis": true, | |
"y-axis": true, | |
"scale": 1, | |
"y_formats": [ | |
"none", | |
"none" | |
], | |
"grid": { | |
"max": null, | |
"min": 0, | |
"threshold1": null, | |
"threshold2": null, | |
"threshold1Color": "rgba(216, 200, 27, 0.27)", | |
"threshold2Color": "rgba(234, 112, 112, 0.22)" | |
}, | |
"resolution": 100, | |
"lines": true, | |
"fill": 1, | |
"linewidth": 2, | |
"points": false, | |
"pointradius": 5, | |
"bars": false, | |
"stack": true, | |
"spyable": true, | |
"options": false, | |
"legend": { | |
"show": true, | |
"values": true, | |
"min": true, | |
"max": true, | |
"current": true, | |
"total": false, | |
"avg": false | |
}, | |
"interactive": true, | |
"legend_counts": true, | |
"timezone": "browser", | |
"percentage": false, | |
"zerofill": true, | |
"nullPointMode": "connected", | |
"steppedLine": false, | |
"tooltip": { | |
"value_type": "cumulative", | |
"query_as_alias": true | |
}, | |
"targets": [ | |
{ | |
"target": "randomWalk('random walk')", | |
"function": "mode", | |
"series": "runtime.memory.gc.pause_per_second", | |
"column": "value", | |
"interval": "1s" | |
} | |
], | |
"aliasColors": { | |
"runtime.memory.allocated.mode": "#E24D42" | |
}, | |
"aliasYAxis": {}, | |
"title": "Gc时间(pause_per_second)", | |
"datasource": null, | |
"renderer": "flot", | |
"annotate": { | |
"enable": false | |
}, | |
"leftYAxisLabel": "" | |
} | |
], | |
"notice": false | |
} | |
], | |
"editable": true, | |
"failover": false, | |
"panel_hints": true, | |
"style": "dark", | |
"pulldowns": [ | |
{ | |
"type": "filtering", | |
"collapse": false, | |
"notice": false, | |
"enable": false | |
}, | |
{ | |
"type": "annotations", | |
"enable": false | |
} | |
], | |
"nav": [ | |
{ | |
"type": "timepicker", | |
"collapse": false, | |
"notice": false, | |
"enable": true, | |
"status": "Stable", | |
"time_options": [ | |
"5m", | |
"15m", | |
"1h", | |
"6h", | |
"12h", | |
"24h", | |
"2d", | |
"7d", | |
"30d" | |
], | |
"refresh_intervals": [ | |
"5s", | |
"10s", | |
"30s", | |
"1m", | |
"5m", | |
"15m", | |
"30m", | |
"1h", | |
"2h", | |
"1d" | |
], | |
"now": true | |
} | |
], | |
"loader": { | |
"save_gist": false, | |
"save_elasticsearch": true, | |
"save_local": true, | |
"save_default": true, | |
"save_temp": true, | |
"save_temp_ttl_enable": true, | |
"save_temp_ttl": "30d", | |
"load_gist": false, | |
"load_elasticsearch": true, | |
"load_elasticsearch_size": 20, | |
"load_local": false, | |
"hide": false | |
}, | |
"refresh": "5s", | |
"tags": [ | |
"Go", | |
"runtime" | |
], | |
"timezone": "browser" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
http://ww2.sinaimg.cn/large/7121be43jw1eevf6btkh5j21fy0m6n13.jpg