Skip to content

Support Multi-account widgets in newrelic_one_dashboard #2439

Open
@Efrat19

Description

@Efrat19

Feature Description

We can improve the experience for clients using accounts partitioning, if we add a new field account_ids to nrql_query block to accept an array of account ids instead of the single string you can pass today as account_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 docs

Allow a nrql_queries field in the newrelic_one_dashboard.widget_* context. The new accept an array of nrql_query objects, will include 2 fields with the following types:

Support nrql_query.account_ids Field at the newrelic_one_dashboard.widget_*. Context
Currently in a json / manual dashboard implementation, a panel allows nrqlQueries

Describe Alternatives

Currently the alternatives are:

  1. Use multiple nrql_query blocks in a widget block, each with its own account_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. 🤮
  2. Use newrelic_one_dashboard_raw and provide configuration. nrqlQueries[].accountIds to create the multi-account query. Unfortunately using newrelic_one_dashboard_raw isn't the preferred practice and isn't kept up to date, and also lacks features like adding variable blocks
  3. Use newrelic_one_dashboard_json and provide configuration. nrqlQueries[].accountIds to create the multi-account query. This is possible but you have to sacrifice ease of using a human-maintainable, dynamic newrelic_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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions