No description, website, or topics provided.
C++ JavaScript M4 CSS Shell HTML Other
Latest commit 972a852 Nov 9, 2016 @pieterlexis pieterlexis Ignore package files
Permalink
Failed to load latest commit information.
ahutils
build-aux
debian Link against systemd when building debian packages Sep 19, 2016
examples
html Merge pull request #40 from mind04/auth Sep 13, 2016
m4
yahttp
.gitignore
.travis.yml
LICENSE
Makefile.am Allow building for CentOS 6 Nov 9, 2016
README.md
bootstrap
build-deb
build-rpm
configure.ac
dolog.hh
interpolate.cc
interpolate.hh
iputils.cc
iputils.hh
mdump.cc
metromisc.hh
metronome-upstart.conf Fix Upstart script (it was incomplete) Nov 9, 2016
metronome.cc
metronome.service.in
metronome.spec
mmanage.cc
msubmit.cc
statstorage.cc
statstorage.hh
test-statstorage.cc
testrunner.cc

README.md

metronome

Mini-graphite that uses client-side java script to render graphs w/o depending on graphite.

'metronome' implements the carbon protocol, so anything that can feed Graphite can feed metronome. We also accept submissions via POST:

For example, to submit RX bytes for eth0:

while true;
do
    VAL=$(ip -s link ls eth0 | grep RX -A 1 | tail -1 | awk '{print $1}')
    wget -q --post-data="" "http://127.0.0.1:8000/?do=store&name=rxbytes&timestamp=$(date +%s)&value=$VAL" -O /dev/null
    sleep 1
done

To retrieve data:

$ wget http://127.0.0.1:8000/?do=retrieve&name=rxbytes&begin=0&end=$(date +%s)&callback=jsonp

This delivers a JSONP callback with your values in there.

To view, try html/index.html

Installing

Dependencies include a recent g++ (4.7+), Boost and libeigen.

Installing Eigen

Either install libeigen3-dev (Debian, Ubuntu), eigen3-devel (Fedora, EPEL).

To install it manually:

$ wget http://bitbucket.org/eigen/eigen/get/3.2.1.tar.bz2
$ tar xf 3.2.1.tar.bz2

Compiling

$ ./bootstrap
$ ./configure
$ make

If you installed libeigen manually, use ./configure --with-eigen=/path/to/eigen

Running

$ mkdir stats
$ ./metronome --stats-directory=./stats

Next, host the 'html/' directory somewhere on a webserver, and edit 'html/local.js' so it knows the Webserver IP address of metronome (port 8000 on :: by default).

Thanks to

Aki Tuomi for the excellent yahttp, Rickshaw for the graphs. Eigen for the math. And a cast of thousands for C++2011.

status

"Toy" for now - stores all data in flat files, which we read in their entirety to replay data.

But, starting to look nice.