GithubHelp home page GithubHelp logo

chocobozzz / grafana-rrd-server Goto Github PK

View Code? Open in Web Editor NEW

This project forked from doublemarket/grafana-rrd-server

3.0 2.0 0.0 171 KB

A HTTP server that helps Grafana read RRD files via Grafana Simple JSON Datasource plugin

License: MIT License

Go 99.55% Makefile 0.45%

grafana-rrd-server's Introduction

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

grafana-rrd-server's People

Contributors

chocobozzz avatar gnuheidix avatar jmgarciac avatar juliogonzalez avatar lowply avatar miken32 avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.