Support Multi-account widgets in newrelic_one_dashboard
#2439
Labels
enhancement
New feature or request
newrelic_one_dashboard
#2439
Feature Description
We can improve the experience for clients using accounts partitioning, if we add a new field
account_ids
tonrql_query
block to accept an array of account ids instead of the single string you can pass today asaccount_id
.This will be translated to a multi-account query, which is already supported on the nerdGraph API -
widgets.rawConfiguration .nrqlQueries.[].accountIds
and also on the currentnewrelic_one_dashboard.variable
context see docsAllow a
nrql_queries
field in thenewrelic_one_dashboard.widget_*
context. The new accept an array ofnrql_query
objects, will include 2 fields with the following types:Support
nrql_query.account_ids
Field at thenewrelic_one_dashboard.widget_*.
ContextCurrently in a json / manual dashboard implementation, a panel allows
nrqlQueries
Describe Alternatives
Currently the alternatives are:
nrql_query
blocks in a widget block, each with its ownaccount_id
and the same query, as suggested here. This is a bad solution because instead of a combined result (for a multi-account query) you get multiple results (1 for each data account) you will see multliple graphs / billboard items etc. 🤮newrelic_one_dashboard_raw
and provideconfiguration. nrqlQueries[].accountIds
to create the multi-account query. Unfortunately usingnewrelic_one_dashboard_raw
isn't the preferred practice and isn't kept up to date, and also lacks features like addingvariable
blocksnewrelic_one_dashboard_json
and provideconfiguration. nrqlQueries[].accountIds
to create the multi-account query. This is possible but you have to sacrifice ease of using a human-maintainable, dynamicnewrelic_one_dashboard
.Open questions
I started to work on a PR for this but realized the limit comes from the go-client pkg itself- is there a particular reason why
nrqlQuery.AccountIDs
is not supported here?The text was updated successfully, but these errors were encountered: