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

Registered by Gabriel Hurley on 2013-04-17

THIS MUST BE DONE VIA ASYNCHRONOUS COMMUNICATION.

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 socket.io.

Blueprint information

Status:
Complete
Approver:
Gabriel Hurley
Priority:
Low
Drafter:
Ladislav Smola
Direction:
Approved
Assignee:
Sayali Lunkad
Definition:
Obsolete
Series goal:
None
Implementation:
Needs Code Review
Milestone target:
None
Started by
David Lyle on 2014-05-30
Completed by
David Lyle on 2016-10-28

Related branches

Sprints

Whiteboard

In the ceilometer part: https://github.com/yuanotes/horizon/tree/ceilometer
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 https://blueprints.launchpad.net/horizon/+spec/horizon-chart.js
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:
http://www.bissantz.de/site_images/tufte/sparklines.jpg
And some portion of well written theory:
http://www.edwardtufte.com/bboard/q-and-a-fetch-msg?msg_id=0001OR
-- 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).

[1] http://paste.openstack.org/show/62294/
[2] https://review.openstack.org/70454

NOTICE
======

this BP is reserved for December - March 2013 internship (by jpich). https://wiki.gnome.org/OutreachProgramForWomen/2013/DecemberMarch

If somebody needs it in faster, let me know.

Horizon tables extension POC design
-----------------------------------------------------

http://paste.openstack.org/show/55041/

Gerrit topic: https://review.openstack.org/#q,topic:bp/sparklines,n,z

Addressed by: https://review.openstack.org/66269
    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.