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

does it support InfluxDB2? #17

Open
ufoe opened this issue Aug 7, 2024 · 7 comments
Open

does it support InfluxDB2? #17

ufoe opened this issue Aug 7, 2024 · 7 comments
Labels
good first issue Good for newcomers

Comments

@ufoe
Copy link

ufoe commented Aug 7, 2024

it seems not working with InfluxDB2

InfluxDB2 need to auth with token ,but this connector only support auth with username & password.

image image
@ufoe
Copy link
Author

ufoe commented Aug 7, 2024

the username & password works with influxdb-java-client

@AirToSupply
Copy link
Owner

the username & password works with influxdb-java-client

Just support access token for latest release version, you can refer to v3.2.3.1 , If you have any new ideas, please submit your code.

@AirToSupply AirToSupply added the good first issue Good for newcomers label Aug 8, 2024
@ufoe
Copy link
Author

ufoe commented Aug 9, 2024

the username & password works with influxdb-java-client

Just support access token for latest release version, you can refer to v3.2.3.1 , If you have any new ideas, please submit your code.

v3.2.3.1 works for source example

the sink example seems success, but the data didn't show in the database

image

@AirToSupply
Copy link
Owner

the username & password works with influxdb-java-client

Just support access token for latest release version, you can refer to v3.2.3.1 , If you have any new ideas, please submit your code.

v3.2.3.1 works for source example

the sink example seems success, but the data didn't show in the database

image

You can show your complete code, but theoretically it works!Or if it works after you switch to username password mode.

@AirToSupply
Copy link
Owner

the username & password works with influxdb-java-client

Just support access token for latest release version, you can refer to v3.2.3.1 , If you have any new ideas, please submit your code.

v3.2.3.1 works for source example

the sink example seems success, but the data didn't show in the database

image

Hi, I have tried it and it works. I built an influxdb2.x mirror environment with the following command:

docker run -d -p 8086:8086 \
-v "/data/influxdb2/data:/var/lib/influxdb2" \
-v "/data/influxdb2/config:/etc/influxdb2" \
-e DOCKER_INFLUXDB_INIT_MODE=setup \
-e DOCKER_INFLUXDB_INIT_USERNAME=influxdb \
-e DOCKER_INFLUXDB_INIT_PASSWORD=influxdb \
-e DOCKER_INFLUXDB_INIT_ORG=org \
-e DOCKER_INFLUXDB_INIT_BUCKET=test_bucket \
influxdb:2

Then you can create access toke by http://localhost:8066 UI, and run FluxStreamSinkApplication in example package,and enter your access token in specfied token option.

So, you can enter nc -lk 7777 build streaming data,
image

And pay attendation to you timestamp in Line Protocol, Finally, you can see the incoming data on the InfluxDB dashboard:
Data Explore

@AirToSupply
Copy link
Owner

the username & password works with influxdb-java-client

Just support access token for latest release version, you can refer to v3.2.3.1 , If you have any new ideas, please submit your code.

v3.2.3.1 works for source example
the sink example seems success, but the data didn't show in the database
image

Hi, I have tried it and it works. I built an influxdb2.x mirror environment with the following command:

docker run -d -p 8086:8086 \
-v "/data/influxdb2/data:/var/lib/influxdb2" \
-v "/data/influxdb2/config:/etc/influxdb2" \
-e DOCKER_INFLUXDB_INIT_MODE=setup \
-e DOCKER_INFLUXDB_INIT_USERNAME=influxdb \
-e DOCKER_INFLUXDB_INIT_PASSWORD=influxdb \
-e DOCKER_INFLUXDB_INIT_ORG=org \
-e DOCKER_INFLUXDB_INIT_BUCKET=test_bucket \
influxdb:2

Then you can create access toke by http://localhost:8066 UI, and run FluxStreamSinkApplication in example package,and enter your access token in specfied token option.

So, you can enter nc -lk 7777 build streaming data, image

And pay attendation to you timestamp in Line Protocol, Finally, you can see the incoming data on the InfluxDB dashboard: Data Explore

Generally speaking, the numInputRows indicator fed back to the terminal by Spark streaming represents the number of data items written to the external storage. If your InfluxDB does not query the data, it means that the external storage is unreliable. At the same time, as time series data, the granularity of time is generally very fine. You can track the streaming data through the data dashboard in the InfluxDB WebUI through the Custom time range.

@AirToSupply
Copy link
Owner

How to build Influxdb by docker image, it refer to Influxdb Docker Official Image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants