Commit e9c7264f by Torkel Ödegaard

Docs updates

parent 0b1c1bb8
...@@ -8,8 +8,9 @@ page_keywords: grafana, scripted, guide, documentation ...@@ -8,8 +8,9 @@ page_keywords: grafana, scripted, guide, documentation
If you have lots of metric names that change (new servers etc) in a defined pattern it is irritating to constantly have to create new dashboards. If you have lots of metric names that change (new servers etc) in a defined pattern it is irritating to constantly have to create new dashboards.
With scripted dashboards you can dynamically create your dashboards using javascript. In the folder grafana install folder _app/dashboards/_ there is a file named _scripted.js_. This file contains an example of a scripted dashboard. You can access it by using the url: With scripted dashboards you can dynamically create your dashboards using javascript. In the folder grafana install folder
> http://grafana_url/#/dashboard/script/scripted.js?rows=3&name=myName under `public/dashboards/` there is a file named `scripted.js`. This file contains an example of a scripted dashboard. You can access it by using the url:
`http://grafana_url/dashboard/script/scripted.js?rows=3&name=myName`
If you open scripted.js you can see how it reads url paramters from ARGS variable and then adds rows and panels. If you open scripted.js you can see how it reads url paramters from ARGS variable and then adds rows and panels.
...@@ -58,4 +59,4 @@ return dashboard; ...@@ -58,4 +59,4 @@ return dashboard;
## More examples ## More examples
You can find more examples in `app/dashboards/` directory of your grafana installation. You can find more examples in `public/dashboards/` directory of your grafana installation.
...@@ -40,5 +40,6 @@ Example: ...@@ -40,5 +40,6 @@ Example:
```html ```html
<iframe src="http://snapshot.raintank.io/dashboard/solo/snapshot/UtvRYDv650fHOV2jV5QlAQhLnNOhB5ZN?panelId=4&fullscreen&from=1427385145990&to=1427388745990" width="650" height="300" frameborder="0"></iframe> <iframe src="http://snapshot.raintank.io/dashboard/solo/snapshot/UtvRYDv650fHOV2jV5QlAQhLnNOhB5ZN?panelId=4&fullscreen&from=1427385145990&to=1427388745990" width="650" height="300" frameborder="0"></iframe>
``` ```
Below there should be an interactive Grafana graph embedded in an iframe: Below there should be an interactive Grafana graph embedded in an iframe:
<iframe src="http://snapshot.raintank.io/dashboard/solo/snapshot/UtvRYDv650fHOV2jV5QlAQhLnNOhB5ZN?panelId=4&fullscreen&from=1427385145990&to=1427388745990" width="650" height="300" frameborder="0"></iframe> <iframe src="http://snapshot.raintank.io/dashboard/solo/snapshot/IQ7iZF00sHalq0Ffjv6OyclJSA1YHYV1?panelId=4&fullscreen" width="650" height="300" frameborder="0"></iframe>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment