README.md 4.54 KB
Newer Older
Torkel Ödegaard's avatar
Torkel Ödegaard committed
1
2
[Grafana](http://grafana.org) [![Build Status](https://api.travis-ci.org/torkelo/grafana.png)](https://travis-ci.org/torkelo/grafana)
=================
3
A beautiful, easy to use and feature rich Graphite dashboard replacement and graph editor. Visit [grafana.org](http://grafana.org) for screenshots, videos and feature descriptions.
Rashid Khan's avatar
Rashid Khan committed
4

5
6
![](http://grafana.org/assets/img/edit_dashboards.png)

7
8
## Features
### Graphite Target Editor
Torkel Ödegaard's avatar
Torkel Ödegaard committed
9
- Graphite target expression parser
Torkel Odegaard's avatar
Torkel Odegaard committed
10
- Quickly add / edit / remove function ([video demo](http://youtu.be/I90WHRwE1ZM))
Torkel Ödegaard's avatar
Torkel Ödegaard committed
11
12
13
- Function parameters can be easily changed
- Quickly navigate graphite metric structure
- Templating
14
15
- Integrated links to function documentation
- Rearrange function order
Torkel Odegaard's avatar
Torkel Odegaard committed
16
- Native Graphite PNG render support
Torkel Ödegaard's avatar
Torkel Ödegaard committed
17

18
### Graphing
Torkel Ödegaard's avatar
Torkel Ödegaard committed
19
20
21
22
23
24
25
- Fast rendering, even over large timespans.
- Click and drag to zoom.
- Multiple Y-axis.
- Bars, Lines, Points.
- Smart Y-axis formating
- Series toggles & color selector
- Axis labels
26
27
- Grid thresholds, axis labels
- [Annotations] (https://github.com/torkelo/grafana/wiki/Annotations)
Torkel Ödegaard's avatar
Torkel Ödegaard committed
28

29
### Dashboards
Torkel Ödegaard's avatar
Torkel Ödegaard committed
30
31
32
- Create and edit dashboards
- Drag and drop graphs to rearrange
- Set column spans and row heights
33
- Save & [search dashboards](https://github.com/torkelo/grafana/wiki/Search-features)
Torkel Ödegaard's avatar
Torkel Ödegaard committed
34
35
36
- Import & export dashboard (json file)
- Import dashboard from Graphite
- Templating
37
- [Scripted dashboards](https://github.com/torkelo/grafana/wiki/Scripted-dashboards) (generate from js script and url parameters)
38
- Flexible [time range controls](https://github.com/torkelo/grafana/wiki/Time-range-controls)
39
40
41
42
- [Dashboard playlists](https://github.com/torkelo/grafana/wiki/Dashboard-playlist)

### InfluxDB
- [Use InfluxDB](https://github.com/torkelo/grafana/wiki/InfluxDB) as metric datasource
Torkel Ödegaard's avatar
Torkel Ödegaard committed
43
44
45
46
47

# Requirements
Grafana is very easy to install. It is a client side web app with no backend. Any webserver will do. Optionally you will need ElasticSearch if you want to be able to save and load dashboards quickly instead of json files or local storage.

# Installation
Denys Zhdanov's avatar
Denys Zhdanov committed
48
- Download and extract the [latest release](https://github.com/torkelo/grafana/releases).
49
- Rename `config.sample.js` to `config.js`, then change `graphiteUrl` and `elasticsearch` to point to the correct urls. The urls entered here must be reachable by your browser.
Torkel Ödegaard's avatar
Torkel Ödegaard committed
50
- Point your browser to the installation.
Torkel Ödegaard's avatar
Torkel Ödegaard committed
51

Torkel Ödegaard's avatar
Torkel Ödegaard committed
52
To run from master:
Torkel Ödegaard's avatar
Torkel Ödegaard committed
53
- Clone this repository
Torkel Ödegaard's avatar
Torkel Ödegaard committed
54
- Start a web server in src folder
55
- Or create a optimized & minified build:
Torkel Ödegaard's avatar
Torkel Ödegaard committed
56
57
 - npm install (requires nodejs)
 - grunt build
Torkel Ödegaard's avatar
Torkel Ödegaard committed
58

59
When you have Grafana up an running, read the [Getting started](https://github.com/torkelo/grafana/wiki/Getting-started) guide for
60
61
an introduction on how to use Grafana and/or watch [this video](https://www.youtube.com/watch?v=OUvJamHeMpw) for a guide in creating a new dashboard and for creating
templated dashboards.
62

Torkel Ödegaard's avatar
Torkel Ödegaard committed
63
64
65
66
67
68
# Graphite server config
If you haven't used an alternative dashboard for graphite before you need to enable cross-domain origin request. For Apache 2.x:
```
Header set Access-Control-Allow-Origin "*"
Header set Access-Control-Allow-Methods "GET, OPTIONS"
Header set Access-Control-Allow-Headers "origin, authorization, accept"
Torkel Ödegaard's avatar
Torkel Ödegaard committed
69
```
Torkel Ödegaard's avatar
Torkel Ödegaard committed
70

Torkel Ödegaard's avatar
Torkel Ödegaard committed
71
72
If your Graphite web is proteced by basic authentication, you have to enable the HTTP verb OPTIONS, origin
(no wildcards are allowed in this case) and add Access-Control-Allow-Credentials. This looks like the following for Apache:
Torkel Ödegaard's avatar
Torkel Ödegaard committed
73
```
Torkel Ödegaard's avatar
Torkel Ödegaard committed
74
75
76
Header set Access-Control-Allow-Origin "http://mygrafana.com:5656"
Header set Access-Control-Allow-Credentials true

Torkel Ödegaard's avatar
Torkel Ödegaard committed
77
78
79
80
81
82
83
84
85
86
87
88
89
90
<Location />
    AuthName "graphs restricted"
    AuthType Basic
    AuthUserFile /etc/apache2/htpasswd
    <LimitExcept OPTIONS>
      require valid-user
    </LimitExcept>
</Location>
```

# Roadmap
- Improve and refine the target parser and editing
- Improve graphite import feature
- Refine and simplify common tasks
Torkel Ödegaard's avatar
Torkel Ödegaard committed
91
- More panel types (not just graphs)
Torkel Ödegaard's avatar
Torkel Ödegaard committed
92
- Use elasticsearch to search for metrics
Torkel Ödegaard's avatar
Torkel Ödegaard committed
93
- Improve template support
94
- Annotate graph by querying ElasticSearch for events (or other event sources)
Torkel Ödegaard's avatar
Torkel Ödegaard committed
95
- Add support for other time series databases like InfluxDB
Torkel Ödegaard's avatar
Torkel Ödegaard committed
96
97

# Contribute
98
If you have any idea for an improvement or found a bug do not hesitate to open an issue. And if you have time clone this repo and submit a pull request and help me make Grafana the kickass metrics & devops dashboard we all dream about!
Torkel Ödegaard's avatar
Torkel Ödegaard committed
99

Torkel Ödegaard's avatar
Torkel Ödegaard committed
100
Clone repository:
Torkel Ödegaard's avatar
Torkel Ödegaard committed
101
102
- npm install
- grunt server (starts development web server in src folder)
Torkel Ödegaard's avatar
Torkel Ödegaard committed
103
- grunt (runs jshint and less -> css compilation)
Torkel Ödegaard's avatar
Torkel Ödegaard committed
104

Torkel Ödegaard's avatar
Torkel Ödegaard committed
105
106
107
108
# Notice
This software is based on the great log dashboard [kibana](https://github.com/elasticsearch/kibana).

# License
109
Grafana is distributed under Apache 2.0 License.