ripienaar / graphite-graph-dsl Goto Github PK
View Code? Open in Web Editor NEWA small DSL to describe graphite graphs
Home Page: http://www.devco.net/
License: Apache License 2.0
A small DSL to describe graphite graphs
Home Page: http://www.devco.net/
License: Apache License 2.0
Hi, Thanks for the great project. I would love to see the colorList/template property supported, which would allow specifying, per graph/target the colours to use. When using it directly you can specify a colorList directly after the target in the url, and it will cycle through those colours instead of the default. 'template' also lets you use a predefined set of colours from graphite.
Graphite supports multiple output formats as a administrator I should be able to specify the format I want my data displayed in. The list of formats can be found at http://graphite.readthedocs.org/en/0.9.10/render_api.html#format.
It would be nice to specify the default in config/gdash.yaml. Having the ability to override the default at the graph level would be even nicer.
Possible DSL
title "CPU Usage"
vtitle "percent"
area :stacked
description "CPU Usage"
format :svg
The default behaviour of using alias() to force a meaningful label for a field really makes sense.
Although, sometimes we'd like to use graphite's abitilty to fetch a series of values instead of just one. Using alias() on a series of values traces lines for all values in the series but creates only one label for all of them.
One example of such a graph, that I was mentioning by e-mail could be that one wants to get the top 10 domains from a web server that generate the most traffic:
substr(highestAverage(nodes.*.apache.bytes, 10), 1, 2)
Since we don't know which ones will come out, we can't just enumerate the 10 fields.
It would be interesting to be able to make "field" use substr instead of alias. It could be another construct, but it would have pretty much the same properties as "field".. and it would still be possible to use the graphite functions that fetch multiple values in the :data argument to "field".
So, I would suggest having something like :substr => [being, end] in "field" to replace the alias.
I'm not sure if I've missed something in the documentation but I'm frustrated that I'm forced to specify a field name in the graph DSL.
In the Graphite Browser, I can use the following graph target:
groupByNode(request.browser.*.rate, 2, 'sumSeries')
The wildcard represents a browser (e.g. Chrome, Safari etc.). In the Graphite Browser the graph is generated with a correctly labelled legend - i.e. one field per browser type.
However, when I use the graph DSL like this:
field :browser, :data => "groupByNode(request.browser.*.rate, 2, 'sumSeries')"
Every item in the legend is named "browser" which is clearly not what I'm after! Is there any workaround to this? Ideally specifying a name for a field would be optional.
Would you please bump the version? Lots of useful stuff happened recently.
Not sure if this is currently possible due to the double quotes required by exclude. Is there a way to escape quotes from the :data definition?
From the graphte doc:
exclude(seriesList, pattern)
Takes a metric or a wildcard seriesList, followed by a regular expression in double quotes. Excludes metrics that match the regular expression.
Since pull request #16 it no longer works in ruby 1.9.3 because the URI::REGEXP::UNSAFE constant is only available in 1.8.6. This is the offending line:
https://github.com/ripienaar/graphite-graph-dsl/blob/master/lib/graphite_graph.rb#L342
However, I'm not sure how to fix it because it's not clear to me what it's doing or why that was added.
Hi,
I ran into a couple of issues when plotting the following scenario -
Metrics
Server1 - Requests Served
Server2 - Requests Served
Total (Server1 + Server2) - Requests Served
Desired Plot
Server1 and Server2 are stacked.
Total is displayed as a line.
Legend - CactiStyle for all three metrics
Setting the area: to stacked in the DSL stacks everything and thus giving the impression that the total is really high.
I tried the stacked function in Graphite
Using the graphite composer ->
/render?
target=stacked(ip-10-245-39-2.requests)&target=stacked(ip-10-244-221-182..requests)&target=sumSeries(ip*..requests)
This works as expected - giving me the desired plot, but I discovered a bug in the CactiStyle Legend - graphite-project/graphite-web#115
I would love to hear any suggestions on the best approach here.
Hi,
I wanted to group dashboards by nesting subdirectories. R.I. mentioned you could do this here: http://www.devco.net/archives/2011/10/08/gdash-graphite-dashboard.php/comment-page-1#comment-126137
But it doesn't work for me:
root@graphite:/opt/gdash/graph_templates/dashboards# tree
.
|-- dash1
| |-- dash.yaml
| |-- proc-stat-cpu.graph
| |-- vmstat-cpu.graph
| |-- vmstat-io.graph
| |-- vmstat-memory.graph
| -- vmstat-procs.graph
-- dash2
-- nested |-- dash.yaml |-- proc-stat-cpu.graph |-- vmstat-cpu.graph |-- vmstat-io.graph |-- vmstat-memory.graph
-- vmstat-procs.graph
When I go to the app, it only lists dash1.
Everything else is working great.
Thanks for your help,
Brian
Hello,
I've counters in my metrics, like total numbers of search executed.
When I want to graph these as search rate per minute, derivative() oder derivative => true in the DSL doesn't work, but I need summarize(nonNegativeDerivative(series, '1min')) for the outcome to be correct.
It would be nice to get this in the DSL, both nonNegativeDerivative instead of derivative and summarize added to the call.
The other use case which should be kept in mind is that when I compute the search rate per minute over the whole cluster, i use the call
summarize(sumSeries(nonNegativeDerivative((*.mysearchcount)), '1min')
which still should be supported, if not integrated into the DSL syntax.
Thanks for considering my feature request
if target[:alias_by_node]
graphite_target = "aliasByNode(#{graphite_target},#{target[:alias_by_node]})"
elsif target[:alias_sub_search]
graphite_target = "aliasSub(#{graphite_target},"#{target[:alias_sub_search]}","#{target[:alias_sub_replace]}")"
Is there a reason for this being if/elsif? In graphite you can use the two in combination.
Its been quite a while since the last release of graphite-graph-dsl to rubygems.org. Is there a chance that you can cut a new release?
I cant seem to be able to override the default graph_columns in a graph-specific dash.yaml. No matter what I do, the central gdash.yaml setting is used.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.