InfluxDB2/Configuration
From r00tedvw.com wiki
(Difference between revisions)
Line 1: | Line 1: | ||
[[InfluxDB2/Installation|Installation]] | [[InfluxDB2/Configuration|Configuration]] | [[InfluxDB2/Installation|Installation]] | [[InfluxDB2/Configuration|Configuration]] | ||
+ | =Connect and Authenticate= | ||
+ | If you need to setup a new <code>configs</code> file to authenticate with influx cli: | ||
+ | [https://docs.influxdata.com/influxdb/v2.4/reference/cli/influx/config/create/ config] | ||
+ | <nowiki>~$ influx config create --active \ | ||
+ | -n config-name \ | ||
+ | -u http://localhost:8086 \ | ||
+ | -t mySuP3rS3cr3tT0keN \ | ||
+ | -o example-org</nowiki> | ||
+ | |||
=Initial Setup= | =Initial Setup= | ||
[https://docs.influxdata.com/influxdb/v2.4/reference/cli/influx/setup/ influx setup] | [https://docs.influxdata.com/influxdb/v2.4/reference/cli/influx/setup/ influx setup] | ||
+ | This will also setup the <code>configs</code> file in <code>~/.influxdbv2/configs</code> | ||
<nowiki>~$ /usr/bin/influx setup --org name-org --bucket name-bucket --username user --password password --force</nowiki> | <nowiki>~$ /usr/bin/influx setup --org name-org --bucket name-bucket --username user --password password --force</nowiki> | ||
[https://docs.influxdata.com/influxdb/v2.4/organizations/create-org/ influx org create] | [https://docs.influxdata.com/influxdb/v2.4/organizations/create-org/ influx org create] | ||
Line 11: | Line 21: | ||
[https://docs.influxdata.com/influxdb/v2.4/security/tokens/create-token/ influx auth create] | [https://docs.influxdata.com/influxdb/v2.4/security/tokens/create-token/ influx auth create] | ||
<nowiki>~$ /usr/bin/influx auth create --org name-org --read-bucket <alpha numeric bucket id> --read-tasks --write-bucket <alpha numeric bucket id> --write-tasks --user user | <nowiki>~$ /usr/bin/influx auth create --org name-org --read-bucket <alpha numeric bucket id> --read-tasks --write-bucket <alpha numeric bucket id> --write-tasks --user user | ||
+ | |||
+ | =Queries= |
Revision as of 21:45, 8 September 2022
Installation | Configuration
Connect and Authenticate
If you need to setup a new configs
file to authenticate with influx cli:
config
~$ influx config create --active \ -n config-name \ -u http://localhost:8086 \ -t mySuP3rS3cr3tT0keN \ -o example-org
Initial Setup
influx setup
This will also setup the configs
file in ~/.influxdbv2/configs
~$ /usr/bin/influx setup --org name-org --bucket name-bucket --username user --password password --force
~$ /usr/bin/influx org create -n name-org
~$ /usr/bin/influx user create -n user -p password -o name-org
~$ /usr/bin/influx bucket create --name name-bucket --org name-org --retention 30d
~$ /usr/bin/influx auth create --org name-org --read-bucket <alpha numeric bucket id> --read-tasks --write-bucket <alpha numeric bucket id> --write-tasks --user user =Queries=