ekuiper icon indicating copy to clipboard operation
ekuiper copied to clipboard

how to use plugin with influxdb v2

Open tcsll opened this issue 4 years ago • 4 comments

because my influx version is 2.x so i tried to modify influx.go use "github.com/influxdata/influxdb-client-go/v2" for example : m.cli = client.NewClient(m.addr, m.authToken) and other new api

I'm compiling in a Docker container("docker run -p 9081:9081 -d --name kuiper -e MQTT_SOURCE__DEFAULT__SERVERS=[tcp://myip] lfedge/ekuiper:1.2.1")

and compile using the "go build -trimpath -modfile extensions.mod --buildmode=plugin -o plugins/sinks/Influx.so extensions/sinks/influx/influx.go" in the "/go/kuiper/" directory

generated influx.so also created the plugin successfully

But when I use the plugin , I get an error ["plugin was built with a different version of package github.com/pkg/errors"]

so what should I do to use the influx2 plugin..

thank you very much for your support

tcsll avatar Aug 20 '21 03:08 tcsll

@yongxingMa Could you please take a look?

ngjaying avatar Aug 20 '21 03:08 ngjaying

@yongxingMa Could you please take a look?

thanks

tcsll avatar Aug 20 '21 05:08 tcsll

I believe that you need to use a version below 2.0

tfmeneses avatar Aug 25 '21 12:08 tfmeneses

I believe that you need to use a version below 2.0

thank you

I'm not using influx plugins right now,

Modify the source directly by adding the latest influx version (influx_sink.go) to the /xstream/../sinks direction

Then replace kuiper with Kuiped after compilation

And then we achieved our goal,

This bypasses the plug-in approach

tcsll avatar Aug 26 '21 03:08 tcsll