Skip to content
A HTTP server that helps Grafana read RRD files via Grafana Simple JSON Datasource plugin
Go Makefile
Branch: master
Clone or download

Latest commit

Hayato Matsuura
Hayato Matsuura Tweak tag support for CircleCI 2.0 (#41)
* Tweak tag support for CircleCI 2.0

* fix missing colon
Latest commit 3e319cf Apr 1, 2018

Files

Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.circleci Tweak tag support for CircleCI 2.0 (#41) Apr 1, 2018
sample Add annotations support (#31) Sep 19, 2017
.gitignore Add vendoring support Jan 18, 2017
LICENSE Add LICENSE (#19) Apr 7, 2017
Makefile Add Makefile Jan 18, 2017
README.md Add doc for openSUSE Feb 5, 2018
glide.lock Migrate to CircleCI 2.0 (#40) Apr 1, 2018
glide.yaml Migrate to CircleCI 2.0 (#40) Apr 1, 2018
rrdserver.go
rrdserver_test.go Add annotations support (#31) Sep 19, 2017

README.md

Grafana RRD Server

A simple HTTP server that reads RRD files and responds to requests from Grafana with Grafana Simple JSON Datasource plugin.

CircleCI Coveralls GitHub release

This server supports all endpoints (urls) defined in the Grafana Simple JSON Datasource plugin documentation but:

  • You can use * as a wildcard in the target values (but not for ds) for the /query endpoint.

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 openSUSE

    sudo zypper in rrdtool-devel
    

    On Mac:

    brew install rrdtool
    
  2. Get the package.

    go get github.com/doublemarket/grafana-rrd-server
    

    Otherwise, download the latest release, 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)
    • -i : Specifies server listen address. (default: any)
    • -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.
    • -a : Specifies the annotations file. It should be a CSV file which has a title line at the top like the sample file.
    • -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

  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

You can’t perform that action at this time.