adding Raj edits/additions as well as initial round of pages I created

This commit is contained in:
Trent White 2015-08-10 17:44:08 -04:00
parent 835fd383ad
commit a4be75f410
8 changed files with 116 additions and 62 deletions

View File

@ -26,17 +26,21 @@ Default | Default data source means that it will be pre-selected for new panels.
Url | The http protocol, ip and port of you graphite-web or graphite-api install.
Access | Proxy = access via Grafana backend, Direct = access directory from browser.
Proxy access means that the Grafana backend will proxy all requests from the browser, and send them on to the Data Source. This is useful because it can eliminate CORS (Cross Origin Site Resource) issues, as well as eliminate the need to disseminate authentication details to the Data Source to the brower.
Direct access is still supported because in some cases it may be useful to access a Data Source directly depending on the use case and topology of Grafana, the user, and the Data Source.
## Metric editor
### 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.
![](/img/animated_gifs/graphite_query1.gif)
### 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
@ -70,3 +74,6 @@ You can also create nested variables that use other variables in their definitio
![](/img/v2/templated_variable_parameter.png)
## Query Reference
You can reference queries by the row “letter” that theyre on (similar to Microsoft Excel). If you add a second query to graph, you can reference the first query simply by typing in #A. This provides an easy and convenient way to build compounded queries.

View File

@ -10,6 +10,8 @@ There are currently two separate datasources for InfluxDB in Grafana: InfluxDB 0
The API and capabilities of InfluxDB 0.9.x are completely different from InfluxDB 0.8.x which is why Grafana handles
them as different data sources.
InfluxDB 0.9 is rapidly evolving and we continue to track its API. InfluxDB 0.8 is no longer maintained by InfluxDB Inc, but we provide support as a convenience to existing users.
## Adding the data source to Grafana
Open the side menu by clicking the the Grafana icon in the top header. In the side menu under the `Dashboards` link you
should find a link named `Data Sources`. If this link is missing in the side menu it means that your current
@ -29,8 +31,10 @@ Database | Name of your influxdb database
User | Name of your database user
Password | Database user's password
> *Note* When using Proxy access mode the InfluxDB database, user and password will be hidden from the browser/frontend. When
> using direct access mode all users will be able to see the database user & password.
> Proxy access means that the Grafana backend will proxy all requests from the browser, and send them on to the Data Source. This is useful because it can eliminate CORS (Cross Origin Site Resource) issues, as well as eliminate the need to disseminate authentication details to the Data Source to the brower.
> Direct access is still supported because in some cases it may be useful to access a Data Source directly depending on the use case and topology of Grafana, the user, and the Data Source.
## InfluxDB 0.9.x

View File

@ -5,15 +5,20 @@ page_keywords: grafana, kairosdb, documentation
---
# KairosDB Guide
Grafana v2.1 brings initial support for KairosDB Datasources. While the process of adding the datasource is similar to adding a Graphite or OpenTSDB datasource type, Kairos DB does have a few different options for building queries.
## Adding the data source to Grafana
Open the side menu by clicking the the Grafana icon in the top header. In the side menu under the `Dashboards` link you
should find a link named `Data Sources`. If this link is missing in the side menu it means that your current
user does not have the `Admin` role for the current organization.
![](/img/v2/add_kairosDB.jpg)
1. Open the side menu by clicking the the Grafana icon in the top header.
2. In the side menu under the `Dashboards` link you should find a link named `Data Sources`.
> NOTE: If this link is missing in the side menu it means that your current user does not have the `Admin` role for the current organization.
3. Click the `Add new` link in the top header.
4. Select `KairosDB` from the dropdown.
<!-- ![](/img/v2/add_datasource_kairosdb.png) -->
Now click the `Add new` link in the top header.
Name | Description
------------ | -------------
@ -25,24 +30,23 @@ Access | Proxy = access via Grafana backend, Direct = access directory from brow
## Query editor
Open a graph in edit mode by click the title.
<!-- ![](/img/v2/kairosdb_query_editor.png) -->
![](/img/v2/kairos_query_editor.png)
For details on KairosDB metric queries checkout the offical.
- [Query Metrics - KairosDB 0.9.4 documentation](http://kairosdb.github.io/kairosdocs/restapi/QueryMetrics.html).
## Templated queries
KairosDB Datasource Plugin provides following functions in `Variables values query` field in Templating Editor to query `metric names`, `tag names`, and `tag values` to kairosdb server.
Name | Description
---- | ----
`metrics(query)` | Returns a list of metric names matching `query`. If nothing is given, returns a list of all metric names.
| ------- | --------|
`metrics(query)` | Returns a list of metric names matching `query`. If nothing is given, returns a list of all metric names.
`tag_names(query)` | Returns a list of tag names matching `query`. If nothing is given, returns a list of all tag names.
`tag_values(metric, tag)` | Returns a list of values for `tag` from the given `metric`.
`tag_values(metric,tag)` | Returns a list of values for `tag` from the given `metric`.
For details of `metric names`, `tag names`, and `tag values`, please refer to the KairosDB documentations.
- [List Metric Names - KairosDB 0.9.4 documentation](http://kairosdb.github.io/kairosdocs/restapi/ListMetricNames.html)
- [List Tag Names - KairosDB 0.9.4 documentation](http://kairosdb.github.io/kairosdocs/restapi/ListTagNames.html)
- [List Tag Values - KairosDB 0.9.4 documentation](http://kairosdb.github.io/kairosdocs/restapi/ListTagValues.html)
- [Query Metrics - KairosDB 0.9.4 documentation](http://kairosdb.github.io/kairosdocs/restapi/QueryMetrics.html).
- [Query Metrics - KairosDB 0.9.4 documentation](http://kairosdb.github.io/kairosdocs/restapi/QueryMetrics.html).

View File

@ -5,15 +5,17 @@ page_keywords: grafana, opentsdb, documentation
---
# OpenTSDB Guide
The newest release of Grafana adds additional functionality when using an OpenTSDB Data source.
## Adding the data source to Grafana
Open the side menu by clicking the the Grafana icon in the top header. In the side menu under the `Dashboards` link you
should find a link named `Data Sources`. If this link is missing in the side menu it means that your current
user does not have the `Admin` role for the current organization.
![](/img/v2/add_openTSDB.jpg)
![](/img/v2/add_datasource_opentsdb.png)
1. Open the side menu by clicking the the Grafana icon in the top header.
2. In the side menu under the `Dashboards` link you should find a link named `Data Sources`.
Now click the `Add new` link in the top header.
> NOTE: If this link is missing in the side menu it means that your current user does not have the `Admin` role for the current organization.
3. Click the `Add new` link in the top header.
4. Select `OpenTSDB` from the dropdown.
Name | Description
------------ | -------------
@ -29,9 +31,12 @@ Open a graph in edit mode by click the title.
### Auto complete suggestions
You should get auto complete suggestions for tags and tag values. If you do not you need to enable `tsd.core.meta.enable_realtime_ts` in
the OpentSDB server settings. This is required for the OpenTSDB `lookup` api to work.
the OpenTSDB server settings.
> Note: This is required for the OpenTSDB `lookup` api to work.
## Templating queries
Grafana's OpenTSDB data source now supports template variable values queries. This means you can create template variables that fetch the values from OpenTSDB (for example metric names, tag names, or tag values). The query editor is also enhanced to limiting tags by metric.
When using OpenTSDB with a template variable of `query` type you can use following syntax for lookup.
@ -39,9 +44,4 @@ When using OpenTSDB with a template variable of `query` type you can use followi
tag_names(cpu) // return tag names (i.e. keys) for a specific cpu metric
tag_values(cpu, hostname) // return tag values for metric cpu and tag key hostname
For details on opentsdb metric queries checkout the official [OpenTSDB documentation](http://opentsdb.net/docs/build/html/index.html)
For details on opentsdb metric queries checkout the official [OpenTSDB documentation](http://opentsdb.net/docs/build/html/index.html)

View File

@ -8,55 +8,62 @@ no_toc: true
<div class="row">
<div class="columns medium-6">
<h3>Episode 1 - Building Graphite Queries</h3>
This tutorial discusses how the Graphite query editor works, how to use different graphing functions and when use when to use certain graph display settings
<div class="video-container">
<iframe height="215" src="//www.youtube.com/embed/mgcJPREl3CU?list=PLDGkOdUX1Ujo3wHw9-z5Vo12YLqXRjzg2" frameborder="0" allowfullscreen></iframe>
</div>
</div>
<div class="columns medium-6">
<h3>Episode 2 - Templated Graphite Queries</h3>
The screencast focuses on templating in Graphite and how to make reusable and adaptable dashboards for various data sources and metrics.
<div class="video-container">
<iframe height="215" src="//www.youtube.com/embed/FhNUrueWwOk?list=PLDGkOdUX1Ujo3wHw9-z5Vo12YLqXRjzg2" frameborder="0" allowfullscreen></iframe>
</div>
</div>
</div>
<br/>
<div class="row">
<div class="columns medium-6">
<h3>Episode 3 - Whats New In Grafana 2.0</h3>
This screencast highlights many of the great new features that were included in the Grafana 2.0 release.
<div class="video-container">
<iframe height="215" src="https://www.youtube.com/embed/FC13uhFRsVw?list=PLDGkOdUX1Ujo3wHw9-z5Vo12YLqXRjzg2" frameborder="0" allowfullscreen></iframe>
</div>
</div>
<div class="columns medium-6">
<h3>Episode 4 - Installation & Configuration on Ubuntu / Debian</h3>
Shows how to easily install the dependcies and packages to get Grafana 2.0 up and running on Ubuntu or Debian in just a few mintues.
<div class="video-container">
<iframe height="215" src="https://www.youtube.com/embed/JY22EBOR9hQ?list=PLDGkOdUX1Ujo3wHw9-z5Vo12YLqXRjzg2" frameborder="0" allowfullscreen></iframe>
</div>
</div>
</div>
<br/>
<div class="row">
<div class="columns medium-6">
<h3>Episode 5 - Installation & Configuration on Redhat / Centos</h3>
This screencasts shows how to get Grafana 2.0 installed and configured quickly on RPM based Linux operating systems.
<div class="video-container">
<iframe height="215" src="https://www.youtube.com/embed/E-gMFv84FE8?list=PLDGkOdUX1Ujo3wHw9-z5Vo12YLqXRjzg2" frameborder="0" allowfullscreen></iframe>
</div>
</div>
<div class="columns medium-6">
<h3>Episode 6 - Adding data sources, users & organizations</h3>
Now that Grafana has been installed, learn about adding data sources and get a closer look at adding and managing users and organizations.
<div class="video-container">
<iframe height="215" src="https://www.youtube.com/embed/9ZCMVNxUf6s?list=PLDGkOdUX1Ujo3wHw9-z5Vo12YLqXRjzg2" frameborder="0" allowfullscreen></iframe>
</div>
</div>
</div>
<br/>
<div class="row">
<div class="columns medium-6">
<h3>Episode 7 - Beginners guide to building dashboards</h3>
For newer users of Grafana, this screencast will familiarize you with the general UI and teach you how to build your first dashboard.
<div class="video-container">
<iframe height="215" src="https://www.youtube.com/embed/sKNZMtoSHN4?list=PLDGkOdUX1Ujo3wHw9-z5Vo12YLqXRjzg2" frameborder="0" allowfullscreen></iframe>
</div>
</div>
<div class="columns medium-6">
</div>
</div>
</div>

View File

@ -6,34 +6,34 @@ page_keywords: grafana, build, contribute, documentation
# Building Grafana from source
Guide for creating packages from source, and for getting grafana up and running in
dev environment.
This guide will help you create packages from source and get grafana up and running in
dev environment. Grafana ships with its own required backend server; also completely open-source. It's written in [Go](http://golang.org) and has a full [HTTP API](/v2.1/reference/http_api/).
## Dependencies
- Go 1.4
- NodeJS
- [Go 1.4](https://golang.org/dl/)
- [NodeJS](https://nodejs.org/download/)
## Get Code
Create a directory for the project and set your path accordingly. Then download and install Grafana into your $GOPATH directory
```
export GOPATH=`pwd`
go get github.com/grafana/grafana
```
## Building the backend
## Build the Backend
```
cd $GOPATH/src/github.com/grafana/grafana
go run build.go setup (only needed once to install godep)
$GOPATH/bin/godep restore (will pull down all golang lib dependecies in your current GOPATH)
$GOPATH/bin/godep restore (will pull down all golang lib dependecies in your current GOPATH)
go build .
```
## Building on Windows
#### Building on Windows
The Grafana backend includes Sqlite3 which requires GCC to compile. So in order to compile Grafana on windows you need
to install GCC. We recommend [TDM-GCC](http://tdm-gcc.tdragon.net/download).
## Building frontend assets
## Build the Front-end Assets
To build less to css for the frontend you will need a recent version of of node (v0.12.0),
npm (v2.5.0) and grunt (v0.4.5). Run the following:
@ -44,19 +44,21 @@ npm install -g grunt-cli
grunt
```
## Recompile backend on source change
To rebuild on source change (requires that you executed godep restore)
```
go get github.com/Unknwon/bra
bra run
```
## Running
## Running Grafana Locally
You can run a local instance of Grafana by running:
```
./grafana-server
```
Open grafana in your browser (default http://localhost:3000) and login with admin user (default user/pass = admin/admin).
Open grafana in your browser (default [http://localhost:3000](http://localhost:3000)) and login with user/pass = admin/admin.
## Developing for Grafana
To add features, customize your config, etc, you'll need to rebuild on source change (requires that you executed [godep restore](#build-the-backend), as outlined above).
```
go get github.com/Unknwon/bra
bra run
```
You'll also need to run `grunt watch` to watch for changes to the front-end.
## Creating optimized release packages
This step builds linux packages and requires that fpm is installed. Install fpm via `gem install fpm`.
@ -74,5 +76,7 @@ You only need to add the options you want to override. Config files are applied
2. custom.ini
## Create a pull requests
Please contribute to the Grafana project and submit a pull request! Build new features, write or update documentation, fix bugs and generally make Grafana even more awesome.
Before or after your create a pull requests, sign the [contributor license agreement](/project/cla.html).
Before or after you create a pull request, sign the [contributor license agreement](/project/cla.html).
Together we can build amazing software faster.

View File

@ -28,7 +28,7 @@ but protects both the contributor and the company / foundation behind the projec
It also gives us the option to relicense the code with a more permissive license in the future.
If you have more questions, shoot us an email or drop by #grafana on IRC (freenode).
If you have more questions, shoot us an [email](mailto:torkel@grafana.org) or drop by #grafana on IRC (freenode).
Many thanks to [RethinkDB](http://rethinkdb.com) for permission to re-use their CLA!
@ -82,4 +82,4 @@ You are not expected to provide support for your contributions, except to the ex
The failure of either party to enforce its rights under this agreement for any period shall not be construed as a waiver of such rights. No changes or modifications or waivers to this Agreement will be effective unless in writing and signed by both parties. In the event that any provision of this agreement shall be determined to be illegal or unenforceable, that provision will be limited or eliminated to the minimum extent necessary so that this agreement shall otherwise remain in full force and effect and enforceable. This agreement shall be governed by and construed in accordance with the laws of the State of California in the United States without regard to the conflicts of laws provisions thereof. In any action or proceeding to enforce rights under this agreement, the prevailing party will be entitled to recover costs and attorneys fees.
<iframe src="https://docs.google.com/forms/d/1iagLZBotC4IIrz7TXvEdPU5tCtFDk__C5Rs92afXpCE/viewform?embedded=true" width="800" height="820" frameborder="0" marginheight="0" marginwidth="0">Loading CLA...</iframe>
<iframe src="https://docs.google.com/forms/d/1iagLZBotC4IIrz7TXvEdPU5tCtFDk__C5Rs92afXpCE/viewform?embedded=true" width="800" height="820" frameborder="0" marginheight="0" marginwidth="0">Loading CLA...</iframe>

View File

@ -9,29 +9,57 @@ page_keywords: grafana, templating, variables, guide, documentation
## Overview
Templating allows your Dashboards to be more interactive and dynamic. You can create Template variables that can be used practically anywhere in Grafana: metric queries on individual panels, series names, and titles.
Dashboard Templating allows you to make your Dashboards more interactive and dynamic.
Quickly change Template variables to show different graphs and metrics for different server and applications.
Theyre one of the most powerful and most used features of Grafana, and theyve recently gotten even more attention in Grafana 2.0 and Grafana 2.1.
You can create Dashboard Template variables that can be used practically anywhere in a Dashboard: data queries on individual Panels (within the Query Editor), the names in your legends, or titles in Panels and Rows.
You can configure Dashboard Templating by clicking the dropdown cog on the top of the Dashboard while viewing it.
You can find and configure the Templating for a particular Dashboard by clicking the dropdown cog on the top of the Dashboard when viewing it.
## Variable types
There are three different types of Template variables. They can all be used to create dynamic variables that you can use throughout the Dashboard. They differ slightly in how they create values.
There are three different types of Template variables: query, custom, and interval.
They can all be used to create dynamic variables that you can use throughout the Dashboard, but they differ in how they get the data for their values.
### Query
> The Query type is often Data Source specific. Please consult the appropriate documentation for your particular Data Source.
> Note: The Query type is often Data Source specific. Please consult the appropriate documentation for your particular Data Source.
This is the most common type of Template variable. Using the Query type to generate a dynamic list of variables, simply by allowing Grafana to explore your Data Source metric namespace when the Dashboard loads.
For example a query like `prod.servers.*` will fill the variable with all possible values that exists in that wildcard position (in the case of the Graphite Data Source).
For example a query like prod.servers.* will fill the variable with all possible values that exists in that wildcard position (in the case of the Graphite Data Source).
You can even create nested variables that use other variables in their definition. For example `apps.$app.servers.*` uses the variable `$app` in its own query definition.
You can even create nested variables that use other variables in their definition. For example apps.$app.servers.* uses the variable $app in its own query definition.
You can utilize the special "All" value to allow the Dashboard user to query for every single Query variable returned. Grafana will automatically translate All into the appropriate format for your Data Source.
As of Grafana 2.1, it is now possible to select a subset of Query Template variables (previously it was possible to select an individual value or 'All', not multiple values that were less than All). This is accomplished via the Multi-Select option. If enabled, the Dashboard user will be able to enable and disable individual variables.
The Multi-Select functionality is taken a step further with the introduction of Multi-Select Tagging. This functionality allows you to group individual Template variables together under a Tag or Group name.
For example, if you were using Templating to list all 20 of your applications, you could use Multi-Select Tagging to group your applications by function or region or criticality, etc.
Multi-Select Tagging functionality is currently experimental but is part of Grafana 2.1. To enable this feature click the enable icon when editing Template options for a particular variable.
[[screenshot of just the tag/group part, enabled, with the 2 queries shown]]
Grafana gets the list of tags and the list of values in each tag by performing two queries on your metric namespace.
The Tags query returns a list of Tags.
The Tag values query returns the values for a given Tag.
Note: a proof of concept shim that translates the metric query into a SQL call is provided. This allows you to maintain your tag:value mapping independently of your Data Source.
Once configured, Multi-Select Tagging provides a convenient way to group and your template variables, and slice your data in the exact way you want. The Tags can be seen on the right side of the template pull-down.
[[screenshot of pulldown with tags]]
You can utilize the special "All" value to allow the Dashboard user to query for every single Query variable returned. Grafana will automatically translate All into the appropriate format for your Data Source.
As of Grafana 2.1, it is now possible to select a subset of Query Template variables (previously it was possible to select an individual value or 'All', not multiple values that were less than All). This is accomplished via the Multi-Select option. If enabled, the Dashboard user will be able to enable and disable individual variables.
### Interval