← Back to team overview

graphite-dev team mailing list archive

Re: [Question #223956]: Graphite-Web Refactoring Help Request

 

Question #223956 on Graphite changed:
https://answers.launchpad.net/graphite/+question/223956

Peter C. Norton posted a new comment:
I haven't had a chance to read this whole thread yet, but I have
implemented a non-whisper/non-ceres/non-rrd backend so  thought I'd
chime in.  As a hackday project, I have added support to graphite-web to
query metrics from kairosdb.  I could help with abstracting for
pluggable backends as well.  I guess a good place to start is what the
requirements are.

The main changes are here: https://github.com/pcn/graphite-
web/tree/add_kairosdb_support

This relies on a kairosdb glue library where I put most of the details
of getting data in a format appropriate for graphite, but the summary
is:

1) In master, there is an idea of "time intervals" which allow data to
be queried from >1 physical location in a single backend.  E.g. host1
has data from yesterday and host2 has data from today.  Their data can
be joined and presented.  Since kairosdb stores the data in a backend
where this doesn't really make sense, I haven't gotten into the details
of this, but this is my understanding and it should be documented.

2) Graphite requires that data be in even steps.  Kairosdb offers good
grouping and aggregation functions, so it was pretty easy to turn data
that could be spaced unevenly to be grouped into appropriate time
intervals.  This is in the glue library, and isn't in the graphite-web
code.

3) graphite-web implements search functionality using a better-than-
globbing/better-than-fnmatch feature, you just have to give it a list of
metrics that the backend knows about.  I didn't know that so I
implemented something inferior that I should go and fix soon.

If you look at the commits in my branch the work required to abstract
these things should be pretty apparent, along with some other details
that don't really stand out in my memory (this was a month ago, and I
need to fix some of this up soon).  I'd be happy to talk about making an
API for this if I can help.

-Peter

-- 
You received this question notification because you are a member of
graphite-dev, which is an answer contact for Graphite.