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

GRAFANA_TOKEN env variable is not passed correctly #16

Closed
jl2397 opened this issue Jun 14, 2024 · 8 comments
Closed

GRAFANA_TOKEN env variable is not passed correctly #16

jl2397 opened this issue Jun 14, 2024 · 8 comments
Assignees
Labels
bug Something isn't working

Comments

@jl2397
Copy link
Contributor

jl2397 commented Jun 14, 2024

When the Grafana class is initialized in grafana.py, there is only a check for the "url" field in the parameters. If the GRAFANA_TOKEN env variable is set, the token is never passed to the GrafanaApi client and therefore results in a GrafanaUnauthorizedError when making requests using grafana_client. A credential field needs to be added to the from_url call to populate the GRAFANA_TOKEN env variable.

@amotl
Copy link
Contributor

amotl commented Jul 3, 2024

Dear @julialau23. Thanks a stack for the report. May we ask if you would have the capacities to submit a patch?

@amotl amotl self-assigned this Jul 3, 2024
@amotl amotl added the bug Something isn't working label Jul 3, 2024
@jl2397
Copy link
Contributor Author

jl2397 commented Jul 10, 2024 via email

@amotl
Copy link
Contributor

amotl commented Jul 11, 2024

Hi @julialau23. Thanks a stack. You can easily fork the repository, and then submit a pull request, no?

@amotl
Copy link
Contributor

amotl commented Sep 20, 2024

Hi @julialau23. We just wanted to check if you have been able to come up with a solution for this you could share with the community?

@jl2397
Copy link
Contributor Author

jl2397 commented Sep 25, 2024

Hi @amotl, apologies for the delay. Pull request has been opened.

@amotl
Copy link
Contributor

amotl commented Oct 3, 2024

Thanks a stack for your contribution per GH-19. I've just merged the improvement with GH-20.

@amotl
Copy link
Contributor

amotl commented Oct 3, 2024

Your improvements have been released per grafana-import v0.3.0, now on PyPI.

@amotl
Copy link
Contributor

amotl commented Oct 16, 2024

I think it will be safe to close this issue. Please re-open otherwise.

@amotl amotl closed this as completed Oct 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants