I've been busy implementing some of the feature requests I've gotten the last few days. Today I'm releasing the result as ekg v0.3. Here's what's new:
Counters and gauges
The old counter concept has been split up into two concepts: counters and gauges. Counters are monotonically increasing while gauges are not. An example of a counter would be requests served since program start and an example of a gauge would be the number of concurrent connections at a given point in time.
The counter/gauge distinction lets us do smarter things in the web interface. For example, given a counter called "iterations", we know that it ought to be graphed as iterations per second, instead of the raw value:
Graphing the raw value wouldn't be very interesting as it would result in a graph that just went straight up to the right.
Graphs for user-defined counters and gauges
The web interface now lets you dynamically add (and remove) graphs for user-defined counters and gauges. To add a graph, click on the little graph icon to the right of the counter or gauge name:
Reorganized REST API
The REST API has been reorganized to allow for finer-grained access to resources e.g. you can request all counters without also getting all gauges.
Server time instead of client time
In previous versions I used the client (i.e. browser) time when plotting graphs. This isn't a terribly good idea as network latency will skew the graphs. Version 0.3 uses the server time instead of client time to render graphs.
I've also made a few minor usability improvements, such as adding column headers, improving number formatting, adding error messages, and reorganizing the user interface.