InfluxDB2/Configuration
From r00tedvw.com wiki
(Difference between revisions)
(→Modifications) |
(→Modifications) |
||
Line 30: | Line 30: | ||
[https://docs.influxdata.com/influxdb/v2.4/organizations/buckets/update-bucket/ bucket update] Update the retention policy of a bucket | [https://docs.influxdata.com/influxdb/v2.4/organizations/buckets/update-bucket/ bucket update] Update the retention policy of a bucket | ||
<nowiki>~$ /usr/bin/influx bucket update -i 16bb74d262c1aa5d -r 30d</nowiki> | <nowiki>~$ /usr/bin/influx bucket update -i 16bb74d262c1aa5d -r 30d</nowiki> | ||
+ | [https://docs.influxdata.com/influxdb/v2.4/organizations/buckets/create-bucket/ bucket create] Create a bucket | ||
+ | <nowiki>~$ influx bucket create -n truenas-bucket -o grafana-org -r 30d</nowiki> | ||
+ | [https://docs.influxdata.com/influxdb/v2.4/organizations/buckets/delete-bucket/ bucket delete] Delete a bucket | ||
+ | <nowiki>~$ influx bucket delete -n truenas -o grafana-org</nowiki> |
Revision as of 21:56, 8 September 2022
Installation | Configuration
Contents |
Connect and Authenticate
config If you need to setup a new configs
file to authenticate with influx cli
~$ 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
~$ /usr/bin/influx org list
~$ /usr/bin/influx bucket list
Modifications
bucket update Update the retention policy of a bucket
~$ /usr/bin/influx bucket update -i 16bb74d262c1aa5d -r 30d
bucket create Create a bucket
~$ influx bucket create -n truenas-bucket -o grafana-org -r 30d
bucket delete Delete a bucket
~$ influx bucket delete -n truenas -o grafana-org