You are browsing a read-only backup copy of Wikitech. The live site can be found at

User:Lucas Werkmeister (WMDE)/Grafana

From Wikitech-static
Jump to navigation Jump to search

I don’t have grafana-admin access, but I still sometimes want to see new metrics before someone else has added them to an existing Grafana board (or created a new one) for me. Totally possible! Just use the Render URL API of Graphite itself, on the endpoint.

For example:

target contains whatever you want to render, and can be any metric expression. (It can also be specified several times.) The simplest case is to just specify a metric name – but beware: there is a MediaWiki. prefix that you don’t see when you use the metric name in PHP ($wgStatsdMetricPrefix), and you also need some suffix to inform Graphite what to do with the metric – for a counter, .count makes sense, for timings, something like .p50 or .p99.

See the Render URL API documentation for the kinds of paths and wildcards you can use in target, as well as for all other URL parameters (width, height, yMax, format, etc.). See the Functions documentation to see what you can do with the metrics (a simple, useful function is alias(metric, "name"), to assign a more readable name, especially if metric is an expression).

Have fun!