-
Notifications
You must be signed in to change notification settings - Fork 524
Graphite
mbostock edited this page Apr 2, 2012
·
14 revisions
A source for Graphite metrics. To create a source, first create a context. Then, use context.graphite to specify the URL of the Graphite server. For example:
var context = cubism.context(), // a default context
graphite = context.graphite("http://graphite.example.com");
# graphite.metric(expression)
Creates a new metric for the given Graphite expression. For example, if you were using Graphite in conjunction with Collectd's CPU plugin, you could monitor the PCU utilization of the machine "foo" by saying:
var foo = graphite.metric("sumSeries(nonNegativeDerivative(exclude(foo.cpu.*.*,'idle')))");
For more information on metric expressions, see Graphite's documentation on the target parameter.
# graphite.toString()
Returns the URL of the graphite server; the first argument to the constructor.