[collectd] rrdgraph in javascript

Manuel Luis Sanmartín Rozada manuel.luis at gmail.com
Sun Sep 4 23:49:17 CEST 2011


Richard, thanks for the changes.
I reorganized the code, separated the draw functions and add output in
svg and pdf, there are some issues with the calculation of text width,
align etc...
I separated the function to fetch the data, functionality  to add
different fetch functions in the same graph  is still lacking.

Tucker, to draw graphs using rrdFile the code is there, but the parser
of the command line is very simple.
I like to complete the description of the graph in JSON, and using a
simple template system to customize the graphs.
Another thing that is missing is an interface to get data from a
webservice, I need to change the function RrdGraph.data_fetch
to do this efficiently: merging requests from the same rrd.

The idea behind this code is to draw and update graphs in realtime
without request all the data every time.
I need to write a plugin for collectd, or modify  rrdcached, to have a
subscription mechanism to request data,
the javascript can connect via a websocket (there is a proxy for
lighttpd:  https://github.com/nori0428/mod_websocket)
to this service, subscribe to the data of interest, and then the data
arrives every 10 secs and update the graphs.

There are new examples in: http://manuelluis.github.com/jsrrdgraph/
Chrome still  have the best performance.



More information about the collectd mailing list