Use ceilometer to add sparkline visualizations to instances views, etc.

Registered by Gabriel Hurley on 2013-04-17


Adding tiny sparkline-style infographics to instance views (and potentially other things like networks, volumes, stacks, etc) would add a lot to the at-a-glance usefulness of these interfaces. Due to the very large amount of data that may need to be transferred, we must do this via an asynchronous method, either AJAX or

Blueprint information

Gabriel Hurley
Ladislav Smola
Sayali Lunkad
Series goal:
Needs Code Review
Milestone target:
Started by
David Lyle on 2014-05-30
Completed by
David Lyle on 2016-10-28

Related branches



In the ceilometer part:
The data for the charts is queried by AJAX. This could be used as a start point.

[lsmola 27.08.2013] the dependency is also on
It will use Line Chart from this blueprint.

Maybe the horizon-chart.js and ceilometer should be added as dependencies.

About the periodical renewing of the sparklines:
- I think a realtime-communication doesn't have to be a dependency right now. Right now the realtime-communication will just let the table row (or chart, or other entity) know, that something has changed and it should refresh itself.
- But I would say, that most of Ceilometer stats, that will be shown here are obtained by polling. So the asynchronous notifications, that something has changed will be periodic. So periodic polling right now will be enough.

Each line chart will be connected to it's own source of data and will display itself asynchronously.

I do see somewhere in the distant future, that the chart will be connected to socket and will receive only part of the statistics. Which will be merged to statistics data, that it already has. But I would see that as another blueprint, as it won't be an easy solution. Also I am not sure, whether this will be much faster, then just asking for all statistic data every time. Showing one line in one chart takes one aggregate query, that is pretty quick in Mongo.

[lsmola | 9.10.2013]
This is how it could look like:
And some portion of well written theory:
-- google for more

[eglynn | 01.02.2014]
As discussed on IRC[1] on Jan 31st, I have been prototyping support for selectable aggregates in the Ceilometer statistics API, along with a new cardinality aggregate function that allows counting the number of distinct values of a particular meter attribute within each period.

This will allow sparklines capturing the trend in per-tenant resource usage to be populated with data surfaced directly in the Ceilometer API.

A WIP patch is out for review[2] with example usage and support for the sqlalchemy driver (mongodb support to follow shortly).



this BP is reserved for December - March 2013 internship (by jpich).

If somebody needs it in faster, let me know.

Horizon tables extension POC design

Gerrit topic:,topic:bp/sparklines,n,z

Addressed by:
    Testing sparklines using mock data

[david-lyle 2014.07.14] Moving milestone to j-3

[david-lyle | 2014.08.28] Moving out of Juno. Out of date.


Work Items

Work items:
Define a view with mock data for sparklines: DONE
Add sparkline to all table cells: DONE
Allow to show/hide sparkline for table colums: TODO
Make sparkline for column fully configurable: TODO
Make a real sparklines connected to Ceilometer in some table: TODO
Show sparklines only if ceilometer service is enabled: TODO

Dependency tree

* Blueprints in grey have been implemented.