Giter VIP home page Giter VIP logo

Comments (6)

toni-moreno avatar toni-moreno commented on September 21, 2024 3

Hello @renatomotorline I've just tested , and with a few changes we can use influxdb-srelay as Pass through proxy.

image

I will upload an update in a few days with this new feature.

from influxdb-srelay.

jcdauchy-moodys avatar jcdauchy-moodys commented on September 21, 2024 1

@nycterent I have a few flux queries working from grafana using srelay.

from influxdb-srelay.

toni-moreno avatar toni-moreno commented on September 21, 2024

Hello @renatomotorline , we have not added Flux as supported query format yet.

https://github.com/toni-moreno/influxdb-srelay/blob/master/examples/rwha-sample.influxdb-srelay.conf#L86-L90

But as described in the following doc https://docs.influxdata.com/flux/v0.65/guides/executing-queries/ , flux queries lives on top of http queries, and could be possible you can use it by changing the uri=["/query"] parameter by uri=["/api/v2/query"] if you don't need special routing features and you do a Pass through filter/route rule like

        key="u"
        match=".*"

If this workaround doesn't work , perhaps a little amount of code could add this new feature.

  • Could you test please ?

from influxdb-srelay.

renatomotorline avatar renatomotorline commented on September 21, 2024

@toni-moreno I already did that and got the error:

influxdb01              | [httpd] 172.27.0.9 - - [27/Apr/2020:11:13:29 +0000] "GET /query HTTP/1.1" 400 45 "-" "influxdb-smart-relay" 1f804bb2-8878-11ea-8154-0242ac1b0004 30
api                     | fluxQuery error: Error: Request failed with status code 400

My config: https://pastebin.com/1pNuHwyJ

nodejs http request:

axios.post('/query', query,
{
    baseURL: `http://${this.host}:${this.port}/api/v2`,
    timeout: 1000,
    headers: {
        'Content-Type': 'application/vnd.flux',
        'Accept': 'application/csv'
    }
}).then(function (response) {
    console.log(`fluxQuery response: ${response.data}`);
    return resolve(response.data);
}).catch(function (error) {
    console.log(`fluxQuery error: ${error}`);
    return reject(error);
});

I converted all flux queries to IQL so is not anymore a problem to me, but someone may need Flux to be supportted in the future. If needed I can do more tests.

from influxdb-srelay.

nycterent avatar nycterent commented on September 21, 2024

hello,

what is the status of this? how can we use flux with srelay? :)

from influxdb-srelay.

toni-moreno avatar toni-moreno commented on September 21, 2024

Well @nycterent there is a pending PR to merge #31 with flux support, @sbengo should review it perhaps a few weeks to merge and release the version.

But you can already to build yourself if you would like to do it

from influxdb-srelay.

Related Issues (20)

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.