← Back to team overview

graphite-dev team mailing list archive

Re: Graphite Feedback and questions

 

Hi Peter, answers are inline below.

On Thu, Aug 26, 2010 at 7:31 PM, Peter Zaitsev <pz@xxxxxxxxxxx> wrote:

> Hi,
>
> I had a chance to look at Graphite deployment today at one of the customers
> and it truly rocks.  I am happy to finally find graphing solution which
> makes a differences between sources and graphs and makes it easy to
> dynamically create graphs as you need to analyze data unlike Cacti Ganglia
> etc.    It is also phenomenal in its simplicity to get the data in.
>
> The use case I am working with it is performance analyzes, mainly around
> MySQL.
>
> Here are some questions I got during the last couple of days using it which
> I have not found a good answer in the manual
>
> 1) Is it possible to see Ratio between 2 values.   For example I want to
> divide transaction rate per number of reads to graph of IOPs per transaction
> ?
>
>
Yes, though its a bit of a hack to do this currently. If you click on the
'Graph Data' button on the Composer window and select one of your graph
targets, there are functions you can apply to it. One of those functions is
called asPercent. This function takes 2 parameters, first is whatever target
metric you selected to apply the function to, the second parameter you will
be prompted for. This can either be a number, or a path to another Graphite
metric. For example (using the URL notation):

Assume you have 2 metrics: myapp.threadpool.activeCount and
myapp.threadpool.poolSize and both are dynamic values. Say you want to
calculate a percentage of how many threads are active in the pool at each
interval. You would do this like so:

target=asPercent(myapp.threadpool.activeCount,myapp.threadpool.poolSize)

This basically takes the ratio of activeCount to poolSize (times 100) at
each interval. If the pool size were fixed at say 42. This would be
equivalent:

target=asPercent(myapp.threadpool.activeCount,42)

You get the idea. Anyways, this isn't exactly a ratio like you are asking
for because asPercent() takes the ratio and then multiples by 100 to give a
percentage value. So what you need to do is just divide the resulting series
by 100 in order to scale it back down to be a real ratio. This would be done
like so:

target=scale(asPercent(myapp.threadpool.activeCount,myapp.threadpool.poolSize),0.01)



> 2) Is it possible to enable Graphiti to show exact value when I mouse over
> the line on the graph ? In some cases you can't see exactly if value is same
> or just close and it can be important for some data points.
>

Unfortunately no, Graphite currently only generates static PNG images which
cannot be made interactive. In order to have an interactive chart you need
it to be rendered on the client side either by flash or SVG and javascript.
There are many free libraries out there that allow this, the problem is that
we do not have any of them integrated to work out of the box with Graphite
yet. So it would take some work to enable this functionality.


> 3) Is it possible to prevent graph from using something other than 0 as the
> lower bound (other than plotting the "zero" datapoint) - for certain data
> types it can produce confusing graphs showing variance which is a lot larger
> than it really is.
>
>
By default Graphite's upper and lower bounds are determined by the values of
your datapoints. It always tries to fit every datapoint in the graph and so
if you have even one datapoint near zero (relatively speaking) then the
graph can get skewed. If your data falls within a predictable range of
values you can add a parameter to the graph's URL to confine the range of
the Y-axis. For example, if you wanted to restrict the Y-axis to be between
100 and 200, you would add the query string parameters yMin=100&yMax=200 to
your graph's url. The problem is, if you have any datapoints that fall
outside of this range they will not be visible in the graph.



> 4) Is it possible to get the graph with log scaling ?  This is helpful if
> you want to get graphs which have values which can be at different scales
> sometimes.  For example number of rows read and written may be close for
> some workloads but for others rows reads may be in millions which makes the
> number of rows read going between 100 and 200 looking as the same value.
> Log scaled graphs allow to see details better in such case.
>
>
You can apply the log() function to any element in your graph individually.
For example:
target=log(mydb.rowsRead)&target=log(mydb.rowsWritten)&target=mydb.cilentsConnected
would show the rows read/written metrics on a logarithmic scale while
clientsConnected would be the actual raw values. Note that graphite only
supports a single Y-axis right now so it is sometimes confusing to mix log()
and non-log() targets in the same graph.


> 5) Is it possible to use expression in scale function ?  I have per minute
> resolution but I'm looking to get
> per second data on the graph which Means I have to scale by 1/60    Right
> now I have to enter 0.016666666  instead which looks confusing compared to
> having expression
>
>
Yup, this is a bit of a wart. We need to add a simple divide() function,
until then your current solution is the only way.



> 6) Is there any way to select the table to be displayed alongside the
> graph.  With Cacti/Ganglia we often plot the table which would show
> min/max/avg/cur data for the data set for reported period which can be
> handy
>
>
This is not something Graphite supports itself but it is possible to do this
by building a UI on top of Graphite (which is a common approach). If you add
rawData=true as a query string parameter to any graph url, you will get back
raw data in a plaintext form instead of a graph.


> 7) Is there way I can zoom from the graph ? For example I'm looking at
> weekly view I have some period where I see something unusual which I'd like
> to zoom to. Some tools allow to do that with mouse which is very convenient.
>  Recording the data and picking it in calendar is less so.
>
>
This is another reason it would be really nice to build an integration with
a client-side graphing library. With a PNG, even if we were to capture the
mouse position/clicks/drags etc, there is no way to correlate mouse position
to a point in time in the graph.


Thanks,
Chris



Thanks :)  Graphite is truly outstanding graphing solution.
>
_______________________________________________
> Mailing list: https://launchpad.net/~graphite-dev
> Post to     : graphite-dev@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~graphite-dev
> More help   : https://help.launchpad.net/ListHelp
>
>

Follow ups

References