Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: setup DBRP mapping automatically for a v2 connection #5998

Merged
merged 6 commits into from
Aug 23, 2022

Conversation

sranka
Copy link
Contributor

@sranka sranka commented Aug 19, 2022

This PR makes it possible to use pre-defined dashboards when setting up a new InfluxDB v2 connection. When a database is not available in a v2 connection (missing V1 DBRP mapping), the implementation tries to create a v1 DBRP mapping so that the existing InfluxQL dashboards (and dashboard suggestions) work properly.

When a V2 connection is specified (InfluxDB v2 Auth is selected)
image

and the user presses Next, the implementation then tries to suggest dashboards. Newly in this PR, if it detects that there is no telegraf database, it attempts to create a v1 DBRP mapping for a v2 bucket of the same name as the database. If such a bucket exists and the DBRP mapping can be created, it creates a database and notifies a user with a message:

image

The suggested dashboards functionality immediately works OOTB.
image

The new functionality requires privileges that allow getting v2 buckets and creating v1 DBRP mapping, an admin (all-access) token for a v2 InfluxDB OSS is required.

@sranka sranka marked this pull request as ready for review August 23, 2022 04:44
@sranka sranka requested a review from ivankudibal August 23, 2022 04:44
Copy link
Contributor

@ivankudibal ivankudibal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

worked fine

@sranka sranka merged commit 3b181b1 into master Aug 23, 2022
@sranka sranka deleted the feat/setup_v2_dbrp branch August 23, 2022 12:10
@sranka sranka added this to the 1.10 milestone Aug 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants