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

When I try to run query from plugin, it gives me "Metric request error" #10

Open
Tugduall opened this issue Nov 18, 2020 · 11 comments
Open

Comments

@Tugduall
Copy link

Here is the configuration of the request and the result

Screenshot from 2020-11-18 10-13-11

Screenshot from 2020-11-18 10-13-37

Is it necessary to use a specific identation for the csv? or what's wrong?

Thank you in advance

@Tugduall Tugduall changed the title When I try to run query from plugin, it gives me "Metric reauest error" When I try to run query from plugin, it gives me "Metric request error" Nov 18, 2020
@vabatox
Copy link

vabatox commented Dec 10, 2020

I get the same error. I successfully connect to bucket. copy in the key for the csv file I want to query.

{
"request": {
"url": "api/ds/query",
"method": "POST",
"data": {
"queries": [
{
"compression": "NONE",
"csv_allow_quoted_record_delimiter": false,
"csv_comments": "#",
"csv_field_delimiter": ",",
"csv_file_header_info": "USE",
"csv_quote_character": """,
"csv_quote_escape_character": """,
"csv_record_delimiter": "\n",
"format": "CSV",
"json_time_bucket": 1000000,
"json_time_field": "",
"json_time_field_enable": false,
"json_time_month_first": false,
"json_type": "DOCUMENT",
"path": "data_uploads/prh_global_uk_sandbox/br_misc_snowflake_upload/bryan12.csv",
"query": "SELECT * FROM s3object",
"refId": "A",
"datasource": "AWS S3",
"datasourceId": 1,
"intervalMs": 30000,
"maxDataPoints": 598,
"orgId": 1
}
],
"range": {
"from": "2020-12-10T09:35:30.517Z",
"to": "2020-12-10T15:35:30.517Z",
"raw": {
"from": "now-6h",
"to": "now"
}
},
"from": "1607592930517",
"to": "1607614530517"
},
"hideFromInspector": false
},
"response": {
"error": "rpc error: code = Unavailable desc = transport is closing",
"message": "Metric request error"
}
}

@burningalchemist
Copy link

@vabatox @Tugduall Hi guys, if you're still interested, I've figured out what was the issue and happy to share. :)

@vabatox
Copy link

vabatox commented Feb 3, 2021

@vabatox @Tugduall Hi guys, if you're still interested, I've figured out what was the issue and happy to share. :)

Yes please, just started looking at this again

@Tugduall
Copy link
Author

Tugduall commented Feb 3, 2021

@vabatox @Tugduall Hi guys, if you're still interested, I've figured out what was the issue and happy to share. :)

Yes please, I avoided the problem for now but I would like to use this pulign

@burningalchemist
Copy link

burningalchemist commented Feb 3, 2021

@vabatox @Tugduall The issue comes from the error handling line (here). If you either remove/comment it out or wrap it properly, this should do the trick at least for processing CSVs.👍 I need to check if it works for the rest of the formats.

Screenshot:
image

I've also updated dependencies to include arm64 builds and added the profile field in the configuration for shared credentials file (~/.aws/credentials) for multi-account configurations. I'm going to push the release archive soon if you can't or don't want to build it locally. Hope this helps.😃

@vabatox
Copy link

vabatox commented Feb 3, 2021

Thanks @burningalchemist. Made the changes to s3-select.go & restarted docker container. Still getting same error though.

@burningalchemist
Copy link

@vabatox Oh no. 😢 Did you rebuild the whole thing? Could you also share your Dockerfile?
I'm happy to help, not sure if we can proceed here. Feel free to contact me via burning.alchemist@gmail.com 😃

@burningalchemist
Copy link

@vabatox
Copy link

vabatox commented Feb 23, 2021

@vabatox Try the zip out - https://github.com/burningalchemist/grafana-s3-plugin/releases/tag/v1.0.1

Thanks I've got it working. Great stuff @burningalchemist 😄

@burningalchemist
Copy link

@vabatox Great! I'm happy it works for you! 👍

@starkblaze01
Copy link
Contributor

starkblaze01 commented Apr 26, 2021

Thanks for reporting the issue and also the fixes :)

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

No branches or pull requests

4 participants