jarred
文件大小: unknow
源码售价: 5 个金币 积分规则     积分充值
资源说明:a web interface for viewing collectd statistics
Jarred
======

Jarred is a viewer for RRD files generated by collectd. In other words it's a
web frontend for collectd.

Features:

 * Server is written in C (so probably fast)
 * Json-based graphs in js (no binary parsing in js, no slow picture generation
   on server)
 * Graphs are interactive (zoom, values, etc.)
 * Customizable presets for dashboard page

Quick Run Guide
---------------

Building with ``./waf`` is easy::

    ./waf configure --prefix=/usr
    ./waf build

You need to have zerogw_ installed.

.. _zerogw: http://github.com/tailhook/zerogw

The easiest way to run it from build dir::

    zerogw -c ./zerogw.yaml &
    ./build/jarred-zgw -c ipc://./socket -d /path/to/rrd -p /rrd

Then you can navigate to::

    http://localhost:8000

Installation
------------

We currently have only ArchLinux package. You can just install it from AUR.
For other users installation procedure follows.

Installing with ``./waf`` is easy::

    ./waf configure --prefix=/usr
    ./waf build
    sudo ./waf install

Now you can use ``jarred-cli`` to get JSONs, but to use web frontend more work
is needed.

You need to have zerogw_ installed. Stating with distributed ``zerogw.yaml``
you need to change socket from ``ipc://./socket`` to something like
``ipc:///var/run/zerogw/jarred.sock``. And change ``root`` under ``static``
section from ``./public`` into something similar to
``/usr/share/jarred/public``.  Now you can run zerogw (refer to zerogw manual
for more details)

``jarred-zgw`` itself has only few command-line options. You need to duplicate
socket address you've written in zerogw, and specify path for rrd::

    ./build/jarred-zgw -c ipc:///var/run/zerogw/jarred.sock -d /var/lib/collectd -p /rrd

(Where ``-p /rrd`` is path in the zerogw config, this is only variant supported
by current js frontend). Now you can navigate to a zerogw instance, for the
example config it's::

    http://localhost:8000

Customizing
-----------

Your dashboard is initially empty, so you may want to proceed to *custom* tab
at the right.  Jarred is installed with no presets, so you should define your
own ones. Use ``public/js/presets.js.sample`` as reference, and put file
``public/js/presets.js`` with your changes (the public directory is usually
placed under ``/usr/share/jarred/public``).

You may also want to add your custom rules. Create ``public/js/rules_local.js``
Use ``public/js/rules.js`` as an example.

.. note::

   ArchLinux package puts symlinks to ``/etc/jarred/presets.js`` and
   ``/etc/jarred/rules_local.js`` for easier managing. Arch package also has
   ``/etc/rc.d/jarred`` startup script which finds out collectd dir by scanning
   ``/etc/collectd.conf``. Don't forget to configure and run zerogw anyway.

本源码包内暂不包含可直接显示的源代码文件,请下载源码包。