Code Monkey home page Code Monkey logo

mod_rrd_graph's Introduction

mod_rrd_graph
=============

RRDtool[1] stores and graphs time-series data. ngx_rrd_graph provides an HTTP
interface to RRDtool's graphing facilities. By linking RRDtool code directly
into Nginx, it is faster than scripts and CGIs with similar purposes.

To install, compile nginx with this option:

    --add-module=/path/to/this/directory

ngx_rrd_graph requires RRDtool 1.3 or later. 

After compiling, installing, and restarting Nginx, ngx_rrd_graph can be enabled
at a particular location with the "rrd_graph" directive, like so:

    location /rrdtool {
        rrd_graph;
    }

RRDtool graphing commands can then be appended to that location in request
URLs. The syntax is just the same as the arguments to the "rrdtool graph"
command, omitting the filename. (Refer to rrdgraph(1).) These commands should
be URL-encoded, so that this command-line invocation:

    rrdtool graph --start now-300s \
                  --end now \
                  DEF:ds0=test.rrd:reading:AVERAGE \
                  LINE1:ds0#00FF00

becomes:

    http://mysite.com/rrdtool--start%20now-300s%20--end%20now%20DEF%3Ads0%3Dtest.rrd%3Areading%3AAVERAGE%20LINE1%3Ads0%2300FF00

If you need spaces in arguments, put quotation marks ("") around the string.

The module supports all the features of your copy of RRDtool. It can output
PNG, PDF, SVG, and EPS graphics (see the --imgformat option of rrdgraph(1)).

If you'd prefer not to provide absolute paths to files referenced in DEF commands,
you may supply a root directory with the "rrd_graph_root" directive. Files mentioned
in DEF commands will be automatically prefixed with the value of rrd_graph_root.
As of this writing there are no guards against relative paths (e.g. "..").

Questions/comments to [email protected].

[1] http://oss.oetiker.ch/rrdtool/

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.