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

Plugins: Include Azure settings as a part of Grafana config sent in plugin requests #79342

Merged
merged 11 commits into from Dec 14, 2023

Conversation

aangelisc
Copy link
Contributor

@aangelisc aangelisc commented Dec 11, 2023

Updates the Grafana config sent to plugins to include the Azure settings from the Grafana instance.

Note that these variables will only be included in requests to the following data sources by default:

  • Azure Monitor (ID: grafana-azure-monitor-datasource)
  • Prometheus (ID: prometheus)
  • Azure Data Explorer (ID: grafana-azure-data-explorer-datasource)
  • MSSQL (ID: mssql)

These variables can be read from the request context sent to a specified plugin by using the ReadSettings or ReadFromContext functions from grafana-azure-sdk-go.

The plugins that receive the settings via context can be overridden via the forward_settings_to_plugins configuration variable in the ini file.

@aangelisc aangelisc requested review from kylebrandt and a team December 11, 2023 17:23
@aangelisc aangelisc self-assigned this Dec 11, 2023
@aangelisc aangelisc requested a review from a team as a code owner December 11, 2023 17:23
@aangelisc aangelisc requested review from asimpson, bossinc, adamyeats and alyssabull and removed request for a team December 11, 2023 17:23
@grafana-delivery-bot grafana-delivery-bot bot added this to the 10.3.x milestone Dec 11, 2023
Copy link
Contributor

@andresmgot andresmgot left a comment

Choose a reason for hiding this comment

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

Also adding @wbrowne as reviewer

pkg/plugins/envvars/envvars.go Outdated Show resolved Hide resolved
@aangelisc aangelisc requested review from torkelo, a team and chri2547 as code owners December 13, 2023 12:19
@aangelisc aangelisc requested review from undef1nd, suntala, yangkb09 and andresmgot and removed request for a team December 13, 2023 12:19
pkg/setting/setting_azure.go Outdated Show resolved Hide resolved
pkg/plugins/envvars/envvars.go Outdated Show resolved Hide resolved
conf/defaults.ini Outdated Show resolved Hide resolved
pkg/plugins/envvars/envvars.go Outdated Show resolved Hide resolved
Copy link
Member

@wbrowne wbrowne left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@andresmgot andresmgot left a comment

Choose a reason for hiding this comment

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

LGTM!

pkg/setting/setting_azure.go Outdated Show resolved Hide resolved
docs/sources/setup-grafana/configure-grafana/_index.md Outdated Show resolved Hide resolved
aangelisc and others added 3 commits December 13, 2023 16:45
Co-authored-by: Andrew Hackmann <5140848+bossinc@users.noreply.github.com>
@aangelisc aangelisc merged commit f3cdb44 into main Dec 14, 2023
14 checks passed
@aangelisc aangelisc deleted the andreas/azure-plugin-config branch December 14, 2023 11:48
@summerwollin summerwollin modified the milestones: 10.3.x, 10.3.0 Jan 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants