graphite-dev team mailing list archive
-
graphite-dev team
-
Mailing list archive
-
Message #00469
Re: Graphite Feedback and questions
Chris,
Thanks for your detailed answer.
I'm looking for graphite use by users who may not be experts in software, so
I'm looking for thing being relatively straightforward.
> 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)
>
Great ! In my case I tried following to see how much traffic per query I'm
getting for illustration purpuses
scale(asPercent(derivative(system.mysql.status.Bytes_sent),derivative(system.mysql.status.Queries)),0.01)
It works great though the graph note looks ugly and barely possible for user
to understand what this names. Is there any way to alias it so it is
displayed as "Traffic Per Query" or something ?
>
>
>
>> 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.
>
Thanks. This makes sense.
>
>
>> 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.
>
Thanks. Can I simply use yMin=0 (but not yMax) to get auto sizing from zero
?
>
>
>
>> 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.
>
Yes... This is easy solution the only problem is it it does not allow to see
the real values. In the example above I'll see only log of rowsWritten
which is hard to convert in the head in real value.
>
>
>> 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.
>
Yes...
I also was wondering how tricky is it to support arbitrary constant
expressions (at least) It should be possible to evaluate expression in the
python. If it is just done once per expression it should be no performance
overhead.
What I mean is if you have scale(system.var,5+2/3) expression 5+2/3 can be
evaluated and replaced with constant before it is passed to the graph engine
to build the graph.
>
>
>
>> 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.
>
Thanks. Makes sense.
>
>
>> 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.
>
>
Couple of more questions I got graphing various data today.
First is it possible to save some derivative data as something like macro ?
For example If I could save the formula mentioned above so I could easily
put it on any graphs or apply more transformations with it ?
Another thing is derivative() function - right now it seems to return
values normalized per minute. Is there similar function which can give me
per second values. It is a lot easier to understand - traffic in MB/sec,
hard drives in IO/sec etc.
--
Peter Zaitsev, CEO, Percona Inc.
Tel: +1 888 401 3401 ext 501 Skype: peter_zaitsev
24/7 Emergency Line +1 888 401 3401 ext 911
Percona Training Workshops
http://www.percona.com/training/
References