wevanscfi / grafana-newrelic-apm-datasource

MIT License
54 stars 16 forks source link

newrelic data source as a template variable? #14

Closed rafal-szypulka closed 7 years ago

rafal-szypulka commented 7 years ago

I created a couple of NewRelic data sources pointing to different NewRelic App IDs . In the new dashboard I created template variable as on the screen below: image Now, in the graph panels I specified variable $NRApp instead of specific NewRelic data source, so theoretically when I switch between data sources from the template menu I should see data from different apps. Unfortunately it doesn't work for me and all graph panels 'remember' previous APP ID and don't switch to another one. Is it supported by this datasource?

rafal-szypulka commented 7 years ago

Hi, I have just found that my scenario works correctly for previous version of newrelic-apm-datasource: branch we/dist.

wevanscfi commented 7 years ago

https://github.com/wevanscfi/grafana-newrelic-apm-datasource/pull/17

This PR should resolve the issue for you.

This broke when I added the option to override the App Id in each metric, and set it up to default the App Id to the datasource's App Id. I updated this to leave the metric setting for the app id null until specified, and then just default to the datasources app id when building each query.