Is graphite ideal for showing aggregate stats and comparing them; howto draw Bar Graphs and pie charts.

Asked by Sanket

Hi,

I am trying to develop a Plugin for Pidgin, a popular multi-protocol chat client. My basic task is to display what all features of Pidgin's interface are commonly used. I have read about graphite's architecture and I found it useful for real-time performance metrics. But my question is related to showing aggregate analysis. Typically I would like to:

Take feedback from multiple users regarding what IM service they are using (this will be automated by my plugin), what all plugins they are using, their architecture type etc. When rendering information I would like something like: What is the relative percentage of people using IM services. As you can see this is not really real-time graphing, but rather aggregated statistics. Is graphite an ideal tool for such tasks ? How can such counters be implemented in graphite ?

Suppose I want to gather information per user about what he uses:
user1: random_hash, im_services: xmpp, jabber, msn, plugins: a, b, c

And I want, count of users using im_serivce xmpp etc.

Also, I found some documentation for drawing pie charts, what about Bar Graphs ?

Thanks for your help.

Cheers
--Sanket

Question information

Language:
English Edit question
Status:
Answered
For:
Graphite Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Michael Leinartas (mleinartas) said :
#1

Generally something is used in front of Graphite to do the aggregation - statsd (https://github.com/etsy/statsd) or one of its clones is most popular. I think you'd want to be storing only the aggregate counters rather than per-user. Graphite is well suited for data which is recorded over time (e.g. count of users using xmpp) but not so well suited for very sparse data like I think you'd have reported directly by the plugin (today this user is using xmpp (binary value)). Using statsd, you'd have each plugin instance send out "increment users.services.xmpp.count by 1" at some interval - say, once per day (per client). If you then summarized the data over a day, you'd have a count of how many users had an active xmpp account for that day.

If you're looking more for absolute counts, you'd need to deal with it somewhat differently so as not to double count clients. I think Graphite might be less suited for this case, though it certainly can be done.

As far as charting, at the moment Graphite is very focused on line graphs. There is basic support for Pie graphs and there's an out of date branch out there in lauchpad that adds some basic bar graph support, but line graphs are where all the features lie. Note that Graphite can also export raw data in json and csv form for use elsewhere.

Can you help with this problem?

Provide an answer of your own, or ask Sanket for more information if necessary.

To post a message you must log in.