ripienaar / graphite-graph-dsl

A small DSL to describe graphite graphs
http://www.devco.net/
Apache License 2.0
167 stars 43 forks source link

Add support for exclude function #27

Open falkenbt opened 11 years ago

falkenbt commented 11 years ago

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.
ripienaar commented 11 years ago

Well its just ruby strings, so standard ruby quote escaping would probably work

falkenbt commented 11 years ago

In this case this does not work (at least I couldn't get it to work) because you end up with something like exclude(seriesList, \"myregex\") but it should look like exclude(seriesList, "\myregex\").

davewongillies commented 11 years ago

You'll need to escape the double quotes and the backslashes, so I'd expect it to look like exclude(seriesList, \"\\myregex\\\")