-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Hayato Matsuura
committed
Apr 9, 2017
1 parent
a0e8fbb
commit 8e8be72
Showing
1 changed file
with
84 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,87 @@ | ||
# Grafana RRD Server | ||
|
||
[![CircleCI](https://circleci.com/gh/doublemarket/grafana-rrd-server/tree/master.svg?style=svg)](https://circleci.com/gh/doublemarket/grafana-rrd-server/tree/master) | ||
A simple HTTP server that reads RRD files and responds to requests from Grafana with [Grafana Simple JSON Datasource plugin](https://grafana.net/plugins/grafana-simple-json-datasource). | ||
|
||
A simple HTTP server that reads RRD files and responds to requests from Grafana with [Grafana Simple JSON Datastore plugin](https://grafana.net/plugins/grafana-simple-json-datasource). | ||
[![CircleCI](https://img.shields.io/circleci/project/github/doublemarket/grafana-rrd-server.svg)](https://github.com/doublemarket/grafana-rrd-server) | ||
[![GitHub release](https://img.shields.io/github/release/doublemarket/grafana-rrd-server.svg)](https://github.com/doublemarket/grafana-rrd-server/releases) | ||
|
||
# Requirement | ||
|
||
- librrd-dev (rrdtool) | ||
- Go | ||
- Grafana 3.0 and newer + Simple JSON Datasource plugin 1.0.0 and newer | ||
|
||
# Usage | ||
|
||
1. Install librrd-dev (rrdtool). | ||
|
||
On Ubuntu/Debian: | ||
|
||
``` | ||
sudo apt install librrd-dev | ||
``` | ||
|
||
On CentOS: | ||
|
||
``` | ||
sudo yum install rrdtool-devel | ||
``` | ||
|
||
On Mac: | ||
|
||
``` | ||
brew install rrdtool | ||
``` | ||
|
||
2. Get the package. | ||
|
||
``` | ||
go get github.com/doublemarket/grafana-rrd-server | ||
``` | ||
|
||
Otherwise, download [the latest release](https://github.com/doublemarket/grafana-rrd-server/releases/latest), gunzip it, and put the file in a directory included in `$PATH`: | ||
|
||
``` | ||
gunzip grafana-rrd-server_linux_amd64.gz | ||
``` | ||
|
||
3. Run the server. | ||
|
||
``` | ||
grafana-rrd-server | ||
``` | ||
|
||
You can use the following options: | ||
|
||
- `-h` : Shows help messages. | ||
- `-p` : Specifies server port. (default: 9000) | ||
- `-r` : Specifies a directory path keeping RRD files. (default: "./sample/") | ||
- The server recursively searches RRD files under the directory and returns a list of them for the `/search` endpoint. | ||
- `-s` : Default graph step in second. (default: 10) | ||
- You can see the step for your RRD file using: | ||
``` | ||
$ rrdtool info [rrd file] | grep step | ||
step = 300 | ||
``` | ||
|
||
4. Setup Grafana and Simple JSON Datastore plugin. | ||
|
||
See [Grafana documentation](http://docs.grafana.org/) | ||
|
||
5. Create datasource. | ||
|
||
# Contributing | ||
|
||
1. Install librrd-dev (rrdtool). | ||
|
||
See the Usage section. | ||
|
||
2. Clone the repository. | ||
|
||
3. Commit your code on a separate branch. | ||
|
||
4. Create a pull request. | ||
|
||
# License | ||
|
||
MIT |