Updated docs
This commit is contained in:
@@ -1,47 +0,0 @@
|
||||
----
|
||||
page_title: Annotations
|
||||
page_description: Annotations user guide
|
||||
page_keywords: grafana, annotations, guide, documentation
|
||||
---
|
||||
|
||||
# Annotations
|
||||

|
||||
|
||||
Annotations provide a way to mark points on the graph with rich events. When you hover over an annotation
|
||||
you can get title, tags, and text information for the event.
|
||||
|
||||
To enable annotations open dashboard settings and the controls tab.
|
||||
Under feature toggles you will find the checkbox for annotations.
|
||||
|
||||
When enabled they will appear in the sub menu controls area.
|
||||

|
||||
|
||||
Click the cog wheel to open the dialog where you can add & edit annotations.
|
||||

|
||||
|
||||
## Datasources
|
||||
Grafana supports many data sources for annotation.
|
||||
|
||||
- Graphite metrics
|
||||
- Graphite events
|
||||
- InfluxDB query
|
||||
- Elasticsearch query
|
||||
|
||||
## InfluxDB Annotations
|
||||

|
||||
|
||||
For InfluxDB you need to enter a query like in the above screenshot. You need to have the ```where $timeFilter``` part.
|
||||
If you only select one column you will not need to enter anything in the column mapping fields.
|
||||
If you have multiple columns you need to specify which column should be treated as title, tags and text column.
|
||||
|
||||
## Elasticsearch Annotations
|
||||

|
||||
|
||||
You can use the same data source as you specified in config.js for storing grafana dashboards or you can specify another one.
|
||||
The annotation definition contains an index name that will override the index name specified in config.js. The index name can
|
||||
be the name of an alias or an index wildcard pattern. You can leave the search query blank or specify a lucene query.
|
||||
|
||||
If your elasticsearch document has a timestamp field other than ```@timestamp``` you will need to specify that. As well
|
||||
as the name for the fields that should be used for the annotation title, tags and text. Tags and text are optional.
|
||||
|
||||
**The annotation timestamp field in elasticsearch need to be in UTC format**
|
||||
@@ -1,50 +0,0 @@
|
||||
---
|
||||
page_title: Export & Import Guide
|
||||
page_description: Export & Import Guide for Grafana
|
||||
page_keywords: grafana, export, import, documentation
|
||||
---
|
||||
|
||||
# Export and Import
|
||||
|
||||
## Export (Json file)
|
||||
|
||||
Load the dashboard you wish to export (e.g. via search)
|
||||
|
||||
Click on the "Save" icon (floppy disk)
|
||||
|
||||

|
||||
|
||||
Click on "Export schema"
|
||||
|
||||

|
||||
|
||||
Save file on local disk
|
||||
|
||||

|
||||
|
||||
## Import
|
||||
|
||||
Click the "Search" icon (open folder)
|
||||
|
||||

|
||||
|
||||
Click "Import" button
|
||||
|
||||

|
||||
|
||||
Click "Browse" button and browse to previously exported dashboard on local disk (which should be a valid Json file)
|
||||
|
||||

|
||||
|
||||
Select exported dashboard
|
||||
|
||||

|
||||
|
||||
|
||||
Click "Save" icon to show save menu
|
||||
|
||||

|
||||
|
||||
Click new save icon (floppy disk) to Save newly imported dashboard
|
||||
|
||||

|
||||
@@ -1,33 +0,0 @@
|
||||
----
|
||||
page_title: Graphite query guide
|
||||
page_description: Graphite query guide
|
||||
page_keywords: grafana, graphite, metrics, query, documentation
|
||||
---
|
||||
|
||||
# Graphite
|
||||
|
||||
Grafana has an advanced graphite query editor that lets you quickly navigate the metric space, add functions.
|
||||
Change function paramaters and much more. The editor cannot handle all types of queries yet.
|
||||
To switch to a regular text box click the pen icon to the right.
|
||||
|
||||
## Navigate metric segments
|
||||
|
||||
Click the ``Select metric`` link to start navigating the metric space. One you start you can continue using the mouse
|
||||
or keyboard arrow keys. You can select a wildcard and still continue.
|
||||
|
||||

|
||||
|
||||
## Functions
|
||||
|
||||
Click the plus icon to the right to add a function. You can search for the function or select it from the menu. Once
|
||||
a function is selected it will be added and your focus will be in the text box of the first parameter. To later change
|
||||
a parameter just click on it and it will turn into a text box. To delete a function click the function name followed
|
||||
by the x icon.
|
||||
|
||||

|
||||
|
||||
|
||||
### Optional parameters
|
||||
Some functions like aliasByNode support an optional second argument. To add this parameter specify for example 3,-2 as the first parameter and the function editor will adapt and move the -2 to a second parameter. To remove the second optional parameter just click on it and leave it blank and the editor will remove it.
|
||||
|
||||

|
||||
@@ -1,32 +0,0 @@
|
||||
---
|
||||
title: Docs - Graphing
|
||||
---
|
||||
|
||||
# Graphing
|
||||
|
||||
The main panel for in Grafana is simply named Graph. It provides a very rich set of graphing options.
|
||||
|
||||
<img src="/img/v1/graph_overview.png" class="no-shadow">
|
||||
|
||||
## Axes, Grid & Legend options
|
||||

|
||||
|
||||
### Legens values
|
||||
|
||||
Check ``Include Values`` under legend styles.
|
||||
|
||||
- Total - Sum of all values returned from metric query
|
||||
- Current - Last value returned from the metric query
|
||||
|
||||
This means that if your series represents a rate, for example requests / second then the Total in the legend will
|
||||
not represent the total number of requests. It is just the sum of all data points.
|
||||
|
||||
|
||||
## Display options
|
||||

|
||||
|
||||
If you have stack enabled you can select what the mouse hover feature should show.
|
||||
|
||||
- Cumulative - Sum of series below plus the series you hover over
|
||||
- Individual - Just the value for the series you hover over
|
||||
|
||||
@@ -1,34 +0,0 @@
|
||||
----
|
||||
page_title: InfluxDB query guide
|
||||
page_description: InfluxDB query guide
|
||||
page_keywords: grafana, influxdb, metrics, query, documentation
|
||||
---
|
||||
|
||||
|
||||
# InfluxDB
|
||||
|
||||
## InfluxDB query editor
|
||||
|
||||

|
||||
|
||||
When you add an InfluxDB query you can specify series name (can be regex), value column and a function. Group by time can be specified or if left blank will be automatically set depending on how long the current time span is. It will translate to a InfluxDB query that looks like this:
|
||||
|
||||
```sql
|
||||
select [[func]]([[column]]) from [[series]] where [[timeFilter]] group by time([[interval]]) order asc
|
||||
```
|
||||
|
||||
To write the complete query yourself click the cog wheel icon to the right and select ``Raw query mode``.
|
||||
|
||||
## InfluxDB Filters & Templated queries
|
||||
|
||||

|
||||
|
||||
|
||||
Use a distinct influxdb query in the filter query input box:
|
||||
|
||||
```sql
|
||||
select distinct(host) from app.status
|
||||
```
|
||||
|
||||
|
||||
|
||||
@@ -1,50 +0,0 @@
|
||||
---
|
||||
page_title: Getting started
|
||||
page_description: Getting started
|
||||
page_keywords: grafana, guide, documentation
|
||||
---
|
||||
|
||||
# Getting started
|
||||
This guide will help you get started and acquainted with the Grafana user interface.
|
||||
|
||||
## Interface overview
|
||||
<img src="/img/v1/interface_guide1.png" class="no-shadow">
|
||||
|
||||
## New dashboard
|
||||

|
||||
|
||||
## Edit graphs
|
||||
Click on a panel's title and then ``Edit`` to open a panel in edit mode.
|
||||

|
||||
|
||||
## Editing Rows
|
||||
To the right of each row you have two colored rectangles, hover over these to get access to quick row controls.
|
||||

|
||||
|
||||
## Drag drop panels
|
||||
Click and drag the panel title to start a drag and drop action.
|
||||

|
||||
|
||||
## Tips and shortcuts
|
||||
|
||||
* Click the graph title and in the dropdown menu quickly change span or duplicate the panel.
|
||||
* Ctrl+S Saves the current dashboard
|
||||
* Ctrl+F Opens the dashboard finder / search
|
||||
* Ctrl+H Hides all controls (good for tv displays)
|
||||
* Hit Escape to exit graph when in fullscreen or edit mode
|
||||
* Click the colored icon in the legend to select series color
|
||||
* Click series name in the legend to hide series
|
||||
* Ctrl/Shift/Meta + Click legend name to hide other series
|
||||
* Click the Save icon in the menu to save the dashboard with a new name
|
||||
* Click the Save icon in the menu and then advanced to export the dashboard to json file, or set it as your default dashboard.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,113 +0,0 @@
|
||||
---
|
||||
page_title: OpenTSDB Guide
|
||||
page_description: OpenTSDB guide for Grafana
|
||||
page_keywords: grafana, opentsdb, documentation
|
||||
---
|
||||
|
||||
# OpenTSDB Guide
|
||||
|
||||
Here you will find some configuration tips for how to setup Grafana and OpenTSDB.
|
||||
|
||||
## OpenTSDB configuration
|
||||
|
||||
For OpenTSDB to work in Grafana you will either be needing to run the latest OpenTSDB
|
||||
version built from the `next` branch that includes built in support for remote
|
||||
api usage (CORS). This was merged into the next branch with [this issue](https://github.com/OpenTSDB/opentsdb/pull/333).
|
||||
|
||||
If you upgrade you have to set the OpenTSDB setting `tsd.http.request.cors_domains` to your
|
||||
grafana webserver domain name.
|
||||
|
||||
If you do not want to upgrade OpenTSDB you need to setup an nginx proxy that will add the necessary CORS
|
||||
HTTP headers.
|
||||
|
||||
Example nginx config:
|
||||
|
||||
Replace:
|
||||
|
||||
- **OPENTSDB_HOST** (2 instances) - Hostname or IP address of the OpenTSDB server
|
||||
- **OPENTSDB_PORT** (1 instance) - Port number of the OpenTSDB server
|
||||
- **GRAFANA_DOMAIN** (1 instance) - Domain/Hostname of the Grafana server
|
||||
|
||||
```nginx
|
||||
upstream opentsdb {
|
||||
server OPENTSDB_HOST:OPENTSDB_PORT fail_timeout=0;
|
||||
}
|
||||
|
||||
server {
|
||||
listen *:4243;
|
||||
|
||||
location / {
|
||||
# Regex to whitelist systems
|
||||
if ($http_origin ~* (https?://([a-z0-9._-]*\.)?GRAFANA_DOMAIN(:[0-9]+)?)) {
|
||||
set $cors "true";
|
||||
}
|
||||
|
||||
# OPTIONS indicates a CORS pre-flight request
|
||||
if ($request_method = 'OPTIONS') {
|
||||
set $cors "${cors}-options";
|
||||
}
|
||||
|
||||
# If it's OPTIONS, then it's a CORS preflight request so respond immediately with no response body
|
||||
if ($cors = "true-options") {
|
||||
add_header 'Access-Control-Allow-Origin' "$http_origin";
|
||||
add_header 'Access-Control-Allow-Credentials' 'true';
|
||||
add_header 'Access-Control-Max-Age' 1728000;
|
||||
add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS';
|
||||
add_header 'Access-Control-Allow-Headers' 'Authorization,Content-Type,Accept,Origin,User-Agent,DNT,Cache-Control,X-Mx-ReqToken,Keep-Alive,X-Requested-With,If-Modified-Since';
|
||||
add_header 'Content-Length' 0;
|
||||
add_header 'Content-Type' 'text/plain charset=UTF-8';
|
||||
return 204;
|
||||
}
|
||||
|
||||
# Proxy the request
|
||||
proxy_set_header X-Host OPENTSDB_HOST;
|
||||
proxy_set_header X-Forwarded-For $Proxy_add_x_forwarded_for;
|
||||
proxy_set_header Authorization "";
|
||||
proxy_pass http://opentsdb;
|
||||
proxy_redirect default;
|
||||
proxy_buffer_size 16k;
|
||||
proxy_buffers 8 32k;
|
||||
proxy_busy_buffers_size 64k;
|
||||
proxy_temp_file_write_size 64k;
|
||||
proxy_read_timeout 120;
|
||||
# Strip any OpenTSDB-generated CORS headers that overlap with our own
|
||||
proxy_hide_header 'Access-Control-Allow-Origin';
|
||||
proxy_hide_header 'Access-Control-Allow-Credentials';
|
||||
proxy_hide_header 'Access-Control-Allow-Headers';
|
||||
|
||||
# if it's a GET or POST, set the standard CORS responses header
|
||||
if ($cors = "true") {
|
||||
# Add our own CORS headers
|
||||
add_header 'Access-Control-Allow-Origin' "$http_origin";
|
||||
add_header 'Access-Control-Allow-Credentials' 'true';
|
||||
add_header 'Access-Control-Allow-Headers' '*';
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## Grafana config
|
||||
In config.js specify your opentsdb datasource:
|
||||
|
||||
```javascript
|
||||
datasources: {
|
||||
'OpenTSDB-TEST': {
|
||||
default: true,
|
||||
type: 'opentsdb',
|
||||
url: "http://my_opentsdb_server:4242"
|
||||
}
|
||||
},
|
||||
```
|
||||
|
||||
## Create a graph
|
||||
Open a graph in edit mode by click the title.
|
||||
|
||||

|
||||
|
||||
For details on opentsdb metric queries
|
||||
checkout the offical [OpenTSDB documentation](http://opentsdb.net/docs/build/html/index.html)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,33 +0,0 @@
|
||||
---
|
||||
page_title: Playlist Guide
|
||||
page_description: Playlist guide for Grafana
|
||||
page_keywords: grafana, playlist, documentation
|
||||
---
|
||||
|
||||
# Playlist Guide
|
||||
|
||||
In Grafana v1.5 a playlist feature was added. You can use this feature by first marking a couple
|
||||
of dashboards as favorites. This is accomplished in the Save menu. Click on the save icon and then _Mark As Favorite_.
|
||||
|
||||
|
||||
## Step 1 - Mark as favorire
|
||||

|
||||
|
||||
Then open the playlist modal. You will find this button in the open dashboard / search popup (CTRL+F).
|
||||
|
||||
## Step 2 - Open playlist view
|
||||

|
||||
|
||||
This opens the playlist view.
|
||||
|
||||
## Step 3 - Select dashbords and interval
|
||||
|
||||

|
||||
|
||||
In this view you can select the dashboards you want to include in the playlist, and even remove dashboards from you favorites list. Set the time span between dashboard change, for example 1m, 10m, 1h for 1 minute, 10 minute or 1 hour interval.
|
||||
|
||||
To start the dashboard click the Start button.
|
||||
|
||||
When a dashboard playlist is running, most menu buttons and dashboard controls are hidden. This is in order to present as clear a view of the dashboard as possible for big tv displays. Click the stop playlist link in the top menu to the right to stop the playlist.
|
||||
|
||||

|
||||
@@ -1,61 +0,0 @@
|
||||
----
|
||||
page_title: Scripted dashboards
|
||||
page_description: Scripted dashboards
|
||||
page_keywords: grafana, scripted, guide, documentation
|
||||
---
|
||||
|
||||
# Scripted 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:
|
||||
> 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.
|
||||
|
||||
## Example
|
||||
|
||||
```javascript
|
||||
var rows = 1;
|
||||
var seriesName = 'argName';
|
||||
|
||||
if(!_.isUndefined(ARGS.rows)) {
|
||||
rows = parseInt(ARGS.rows, 10);
|
||||
}
|
||||
|
||||
if(!_.isUndefined(ARGS.name)) {
|
||||
seriesName = ARGS.name;
|
||||
}
|
||||
|
||||
for (var i = 0; i < rows; i++) {
|
||||
|
||||
dashboard.rows.push({
|
||||
title: 'Scripted Graph ' + i,
|
||||
height: '300px',
|
||||
panels: [
|
||||
{
|
||||
title: 'Events',
|
||||
type: 'graph',
|
||||
span: 12,
|
||||
fill: 1,
|
||||
linewidth: 2,
|
||||
targets: [
|
||||
{
|
||||
'target': "randomWalk('" + seriesName + "')"
|
||||
},
|
||||
{
|
||||
'target': "randomWalk('random walk2')"
|
||||
}
|
||||
],
|
||||
}
|
||||
]
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
return dashboard;
|
||||
```
|
||||
|
||||
## More examples
|
||||
|
||||
You can find more examples in `app/dashboards/` directory of your grafana installation.
|
||||
@@ -1,34 +0,0 @@
|
||||
----
|
||||
page_title: Search guide
|
||||
page_description: Search guide
|
||||
page_keywords: grafana, time range, guide, documentation
|
||||
---
|
||||
|
||||
# Search Guide
|
||||
|
||||
To search and load dashboards click the open folder icon in the header or use the shortcut CTRL+F.
|
||||
|
||||
## Tags
|
||||

|
||||
|
||||
Click on any dashboard or use the down arrow key to navigate the search result and hit enter to open the selected dashboard.
|
||||
|
||||
If you have a lot of dashboards use tags to organize them. You can add tags in the dashboards settings modal.
|
||||
|
||||

|
||||
|
||||
After you have added tags you can now view all available tags in the search popup. Click the tags link to the right in the search box, or just hit tab and then enter. You should now see a list of all tags. You can filter the tag list by continue writing in the search box, for example: "tags!:mongodb".
|
||||
|
||||

|
||||
|
||||
Click on any tag in the tag list to show dashboards with that tag (or just down arrow key to select a tag then enter key).
|
||||
|
||||
## Keyboard navigation
|
||||
|
||||
While the search input has focus you can use your keyboard arrow keys to navigate the results, hit enter to open the selected dashboard.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,18 +0,0 @@
|
||||
----
|
||||
page_title: Templated dashboards
|
||||
page_description: Templated dashboards
|
||||
page_keywords: grafana, templating, variables, guide, documentation
|
||||
---
|
||||
|
||||
# Templated Dashboards
|
||||
|
||||
Templating feature can be enabled under dashboard settings, in the Features tab. The templating feature allows
|
||||
you to create variables that can be used in your metric queries, series names and panel titles. Use this feature to
|
||||
create generic dashboards that can quickly be changed to show graphs for different servers or metrics.
|
||||
|
||||
## Screencast - Templated Graphite Queries
|
||||
<iframe width="561" height="315" src="//www.youtube.com/embed/FhNUrueWwOk?list=PLDGkOdUX1Ujo3wHw9-z5Vo12YLqXRjzg2" frameborder="0" allowfullscreen></iframe>
|
||||
|
||||
<br>
|
||||
## Screencast - Templated InfluxDB Queries
|
||||
Coming soon
|
||||
@@ -1,26 +0,0 @@
|
||||
----
|
||||
page_title: Time Range options
|
||||
page_description: Time range user guide
|
||||
page_keywords: grafana, time range, guide, documentation
|
||||
---
|
||||
|
||||
# Time range controls
|
||||
|
||||

|
||||
|
||||
In the menu you have the time range dropdown (between to Zoom out and refresh links).
|
||||
In this dropdown you have relative time options, auto refresh options and custom time options.
|
||||
|
||||
|
||||
## Custom time
|
||||
|
||||
To customize the relative and auto refresh options open the dashboard settings and click the Timepicker tab.
|
||||
In this tab you can specify the relative and auto refresh intervals. The Timepicker tab settings are saved
|
||||
on per dashboard basis.
|
||||
|
||||

|
||||
|
||||
## Time picker options
|
||||
|
||||
In dashboard settings, `Time Picker` tab you can add or remove the relative time intervals and refresh intervals
|
||||
that should be available in the time picker dropdown.
|
||||
Reference in New Issue
Block a user