README.md
1metronome
2=========
3Mini-graphite that uses client-side java script to render graphs w/o depending on graphite.
4
5'metronome' implements the carbon protocol, so anything that can feed Graphite can feed metronome.
6We also accept submissions via POST:
7
8For example, to submit RX bytes for eth0:
9
10 while true;
11 do
12 VAL=$(ip -s link ls eth0 | grep RX -A 1 | tail -1 | awk '{print $1}')
13 wget -q --post-data="" "http://127.0.0.1:8000/?do=store&name=rxbytes×tamp=$(date +%s)&value=$VAL" -O /dev/null
14 sleep 1
15 done
16
17To retrieve data:
18
19 $ wget http://127.0.0.1:8000/?do=retrieve&name=rxbytes&begin=0&end=$(date +%s)&callback=jsonp
20
21This delivers a JSONP callback with your values in there.
22
23To view, try html/index.html
24
25Installing
26==========
27Dependencies include a recent g++ (4.7+), Boost and libeigen.
28
29Installing Eigen
30----------------
31Either install `libeigen3-dev` (Debian, Ubuntu), `eigen3-devel` (Fedora, EPEL).
32
33To install it manually:
34
35 $ wget http://bitbucket.org/eigen/eigen/get/3.2.1.tar.bz2
36 $ tar xf 3.2.1.tar.bz2
37
38Compiling
39=========
40
41 $ ./bootstrap
42 $ ./configure
43 $ make
44
45If you installed libeigen manually, use `./configure --with-eigen=/path/to/eigen`
46
47Running
48=======
49
50 $ mkdir stats
51 $ ./metronome --stats-directory=./stats
52
53Next, host the 'html/' directory somewhere on a webserver, and edit 'html/local.js' so
54it knows the Webserver IP address of metronome (port 8000 on :: by default).
55
56Thanks to
57=========
58Aki Tuomi for the excellent [yahttp](https://github.com/cmouse/yahttp),
59[Rickshaw](http://code.shutterstock.com/rickshaw/) for the graphs. [Eigen](http://eigen.tuxfamily.org) for the math. And a cast of thousands for C++2011.
60
61status
62======
63"Toy" for now - stores all data in flat files, which we read in their entirety to
64replay data.
65
66But, starting to look nice.
67