wevanscfi / grafana-newrelic-apm-datasource

MIT License
54 stars 16 forks source link

"Web transaction response time" graph #15

Open mic159 opened 7 years ago

mic159 commented 7 years ago

I would like to be able to show the "Web Transaction Response Time" graph from the newrelic overview tab on my dashboard.

Here is what it looks like (screenshot from NR docs): image

Unfortunately the NR API does not expose the metrics for this graph, but it is possible to compute them. Here are the NR docs explaining how to do it: Obtain web transaction time data.

The gist is that you need to do calculations like this:

Datastore time = ( Datastore/${DBTYPE}/allWeb:average_response_time * Datastore/${DBTYPE}/allWeb:call_count ) / HttpDispatcher:call_count
Web external = ( External/allWeb:average_response_time * External/allWeb:call_count ) / HttpDispatcher:call_count

I was wondering if you could think of a way to do this using your plugin?