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

Slowness to retrieve data in dashboard ( POST calls fail repeatedly ) #305

Closed
Ardomotica opened this issue Sep 18, 2024 · 5 comments
Closed

Comments

@Ardomotica
Copy link

Ardomotica commented Sep 18, 2024

What's happening

Discussed in : https://community.grafana.com/t/grafana-timestream-data-source/132439?u=xbox3535889

I am using Grafana to display data from AWS Timestream, it seems to be very slow to display the data, I have tried changing some datasource configuration but the situation remains the same, it is really very slow, do you have any ideas to improve performance ?

In this picture you can see the dashboard loading, it stays loading for several minutes.

Image

In this second pic you’ll find the datasource configuration

Image

I did some testing by trying to run the same query on grafana on the Timestream query editor and it takes about 2 sec :

Image

Reloading grafana after a few minutes, it started the slow loading again, and opening Chrome’s DevTool you can see how the query calls repeatedly fail until an answer comes after several minutes, as you can see :

Image

Anything else we need to know?: As you can see in the plugin configuration i've used "SDK Default" ad Authentication provider

Grafana version: Grafana v11.2.0 (c57667e448)
Plugin version: 2.9.8
OS Grafana is installed on: EC2 Amazon Linux V2 / Linux/UNIX
User OS & Browser: Linux/UNIX
Others:

@iwysiu
Copy link
Contributor

iwysiu commented Sep 20, 2024

Hi @Ardomotica ! We still need to take a look at this, but based on the linked community post, it sounds like you're having an issue with the SDK default taking a long time to get the token. Do you still have this issue if you try another authentication method?

@Ardomotica
Copy link
Author

Hi @iwysiu I've tried with another Authentication Provider (credentials file) using my account and it works properly! But this solution is not useful for our use-case, our Grafana instance will be deployed on a EC2 and all security is managed by an Instance Profile attached to the EC2.

@iwysiu iwysiu moved this from Waiting to Incoming in AWS Datasources Sep 24, 2024
@iwysiu
Copy link
Contributor

iwysiu commented Sep 30, 2024

Hi again @Ardomotica ! It looks like this is a known problem with the AWS SDK, but there are workarounds that other people have tried in this issue that you could look at and try. If that doesn't help we can take another look at it.

@iwysiu iwysiu moved this from Incoming to Waiting in AWS Datasources Sep 30, 2024
@Ardomotica
Copy link
Author

Yes thank you! but I solved the problem in another way. We have the Grafana instance inside a docker container and reading here : https://mrkaran.dev/tils/aws-ec2-metadata-inside-docker/ we realised that we needed to set the TTL to a high enough number to be able to get the token to the container as the EC2 had IMDSv2 set, this solved the problem for us, I hope it was helpful

@iwysiu
Copy link
Contributor

iwysiu commented Oct 1, 2024

I'm glad you were able to fix it!

@iwysiu iwysiu closed this as not planned Won't fix, can't repro, duplicate, stale Oct 1, 2024
@github-project-automation github-project-automation bot moved this from Waiting to Done in AWS Datasources Oct 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

No branches or pull requests

2 participants