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

Influx v2 support #209

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

filipecosta90
Copy link
Contributor

The following PR adds support for InfluxDB v2.
We can easily test it with docker in the following manner.

Spin influxdb v2 container:

docker run -p 8086:8086 influxdb:2.0

Setup steps InfluxDB v2

If on a new setup run the following command:

influx setup

If you need to create a new bucket adjust the bucket name (-n) and the org name (-o) accordingly:

influx bucket create -n bucket-perf -o org -r 0

Create a DBRP mapping with the InfluxDB 1.x compatibility API (official docs).

Adjust bucket name and db accordingly:

influx v1 dbrp create --db benchmark --rp 0 --bucket-id `influx bucket ls --name bucket-perf | awk -v i=2 -v j=1 'FNR == i {print $j}'` --default

Retrieve the auth token as follows:

influx auth list

sample output:

root@01ae6fa8b638:/# influx auth list
ID			Description	Token												User Name	User ID			Permissions
0995d63be80e7000	influx's Token	AWgIqRrsmoo62gFlOV83K0egl-imbsN4pbNit5ykBDC2QXtJ-AHEe5sH-KQqq0N_VSLf-ES1Ydq6R9QFsV8Oxw==	influx		0995d63bd0ce7000	[read:authorizations write:authorizations read:buckets write:buckets read:dashboards write:dashboards read:orgs write:orgs read:sources write:sources read:tasks write:tasks read:telegrafs write:telegrafs read:users write:users read:variables write:variables read:scrapers write:scrapers read:secrets write:secrets read:labels write:labels read:views write:views read:documents write:documents read:notificationRules write:notificationRules read:notificationEndpoints write:notificationEndpoints read:checks write:checks read:dbrp write:dbrp]

Run full cycle mini test

Pass the auth-token via INFLUX_AUTH_TOKEN env variable with the token retrieved on the previous step:

INFLUX_AUTH_TOKEN="AWgIqRrsmoo62gFlOV83K0egl-imbsN4pbNit5ykBDC2QXtJ-AHEe5sH-KQqq0N_VSLf-ES1Ydq6R9QFsV8Oxw==" ./scripts/full_cycle_minitest/full_cycle_minitest_influx.sh 

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

Successfully merging this pull request may close these issues.

None yet

1 participant