Git Product home page Git Product logo

grafana-s3-plugin's Introduction

AWS S3 Plugin tvarit-foggy

This plugin queries files on AWS S3 using S3 Select API

Config Editor Query Editor



Installation

To install, download zip file from release page (for stable version) or download repository as zip file (for installing from git master)

grafana-cli --pluginUrl <path_to_zip_file> plugins install tvarit-s3-datasource

The plugin is not signed. To enable this plugin, change the following

[plugins]
...
# Enter a comma-separated list of plugin identifiers to identify plugins that are allowed to be loaded even if they lack a valid signature.
allow_loading_unsigned_plugins =

to

[plugins]
...
# Enter a comma-separated list of plugin identifiers to identify plugins that are allowed to be loaded even if they lack a valid signature.
allow_loading_unsigned_plugins = tvarit-s3-datasource

File Upload

To allow file upload from inbuilt file browser, add the following CORS policy in the bucket permissions (replace <<>> with the url in your browser)

<?xml version="1.0" encoding="UTF-8"?>
<CORSConfiguration xmlns="http://s3.amazonaws.com/doc/2006-03-01/">
<CORSRule>
    <AllowedOrigin><<<URL>>></AllowedOrigin>
    <AllowedMethod>PUT</AllowedMethod>
    <AllowedMethod>POST</AllowedMethod>
    <AllowedMethod>DELETE</AllowedMethod>
    <ExposeHeader>ETag</ExposeHeader>
    <AllowedHeader>*</AllowedHeader>
</CORSRule>
<CORSRule>
    <AllowedOrigin>*</AllowedOrigin>
    <AllowedMethod>GET</AllowedMethod>
</CORSRule>
</CORSConfiguration>

Reference Links

S3 Select API Reference: https://docs.aws.amazon.com/AmazonS3/latest/API/API_SelectObjectContent.html
Query Reference: https://docs.aws.amazon.com/AmazonS3/latest/dev/s3-glacier-select-sql-reference.html

grafana-s3-plugin's People

Contributors

kamalgalrani avatar starkblaze01 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

grafana-s3-plugin's Issues

Support for arm64 architecture

Any distribution for arm64 architecture?

msg="Failed to start plugin" logger=plugins.backend pluginId=tvarit-s3-datasource error="fork/exec /var/lib/grafana/plugins/tvarit-s3-datasource/dist/gpx_s3_plugin_linux_arm64: no such file or directory"

when i try to run query from plugin, it gives me nosuchkey error

The error : - NoSuchKey: The specified key does not exist. status code: 404, request id: E5AE50E2543C37CE, host id: mfcQYp9T1icc0AaF74jycp1mEua9DCT1qWdcH8MFThOFk4B6lCEogqg1m0zquD0rZkfeVPt8JuE=

However when added S3 as datasource i can see in s3 explorer in plugins all the files in s3 bucket. but when i query them it give me nosuchkey error as shown above.

can you pls share any screenshot where plugin has successfully queried a csv file from the plugin. just that i need to see what all options i want to fill

first option is "path" , not sure what to fill tried many options their.

image

The plugin is not being installed properly

Hi there! I installed the plugin and it looks like is ok, but I'm not seeing it in the UI, I mean, I do not have any option for S3

bash-5.0$ grafana-cli plugins ls
installed plugins:
tvarit-s3-datasource @ 0.0.1

MinIO compatibility

Any roadmap to do this plugin compatible with MinIO, which also support S3 Select?

Using the plugin with grafana 7.5.4

I need to use this plugin with a docker installation.
I have tried to use the GF_PLUGINS_ALLOW_LOADING_UNSIGNED_PLUGINS env variable
BUT grafana is disabling the plugin.

Any workaround idea to use this plugin ?

Is it possible to make this plugin an "official grafana plugin" ?

Plugin cannot query JSON line format

Describe the bug
When querying JSON file from S3, the datasource tries to convert to CSV.

I guess we should be able to keep JSON format as output.

PS: The same query in AWS S3 select works when output is JSON

Please complete the following information:

  • OS: [linux]
  • Browser [chrome]
  • Grafana Version [7.5.6]

Additional context
Here is the error message in Grafana log :

t=2021-06-25T13:55:23+0000 lvl=info msg=S3Select logger=plugins.backend pluginId=tvarit-s3-datasource stats="map[BytesProcessed:131801 BytesReturned:2777 BytesScanned:196524]" โ”‚โ”‚ t=2021-06-25T13:55:23+0000 lvl=eror msg=S3Select logger=plugins.backend pluginId=tvarit-s3-datasource df.ToCSV="ToCSV (jsonRecordsToData: unknown type of map[])"

PS2: Maybe it cannot work on "complex JSON", only flat JSON can work :(

How to install this?

I'm interested in trying this out, but I was unable to figure out how I would install it. Can you provide a link or similar?

I'm using Grafana cloud starter edition.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.