grafana v0.1.3 Grafana.Dashboard View Source
Link to this section Summary
Functions
Delete an existing dashboard with the given slug. Slug is the url-friendly version of the dashboard title
Get a dashboard with the given slug. Slug is the url-friendly version of the dashboard title
Get dashboard from json file
Get the home dashboard
Create a new dashboard specified by json
Format dashboard parameters into JSON
Search dashboards with given parameters. “starred” is a boolean flag indicating whether only starred dashboards should be returned. “tagcloud” is a boolean indicating if a tagcloud should be returned
Get all the available tags for dashboards
Update an existing dashboard as specified in json
Link to this section Functions
Delete an existing dashboard with the given slug. Slug is the url-friendly version of the dashboard title.
iex> {:ok, response} = Grafana.Dashboard.delete(“test”) …> Map.keys(response) [“title”]
Get a dashboard with the given slug. Slug is the url-friendly version of the dashboard title.
iex> {:ok, dash} = Grafana.Dashboard.get “worldping-endpoint-dns” …> Map.keys(dash) [“dashboard”, “meta”]
Get dashboard from json file.
Get the home dashboard
iex> {:ok, dash} = Grafana.Dashboard.home …> Map.keys(dash) [“dashboard”, “meta”]
iex> {:ok, dash} = Grafana.Dashboard.get …> Map.keys(dash) [“dashboard”, “meta”]
Create a new dashboard specified by json.
Format dashboard parameters into JSON.
Model: { “dashboard”: {
"id": null,
"title": "Production Overview",
"tags": [ "templated" ],
"timezone": "browser",
"rows": [
{
}
],
"schemaVersion": 6,
"version": 0
}, “overwrite”: false }
Search dashboards with given parameters. “starred” is a boolean flag indicating whether only starred dashboards should be returned. “tagcloud” is a boolean indicating if a tagcloud should be returned.
iex> {:ok, search} = Grafana.Dashboard.search(“”, false, “Endpoints”, false) …> Map.keys(hd(search)) [“id”, “isStarred”, “tags”, “title”, “type”, “uri”]
Get all the available tags for dashboards.
iex> {:ok, tags} = Grafana.Dashboard.tags …> Map.keys(hd(tags)) [“count”, “term”]
Update an existing dashboard as specified in json.
iex> {:ok, dash} = Grafana.Dashboard.update(%{}) …> Map.keys(dash) [“slug”, “status”, “version”]