Influxdb: Difference between revisions
		
		
		
		
		
		Jump to navigation
		Jump to search
		
				
		
		
	
| No edit summary | |||
| (15 intermediate revisions by the same user not shown) | |||
| Line 5: | Line 5: | ||
| == Initial Setup== | == Initial Setup== | ||
| * Force listen on local IP | === Gui Admin === | ||
| <pre>[http] | |||
| [http://localhost:8086 Influxdb Admin: http://localhost:8086] | |||
| === Command Line === | |||
| * Organization List | |||
| <syntaxhighlight lang="mysql"> | |||
| influx org list --token R0xKoH7_r6w9lpkrTzQtwpeLCP82ZMfF3WDAftUtmFUpDgE0Wdq4GV1w6hozryht0h-gO4ypGn7TaE7V_frd-A= | |||
| </syntaxhighlight> | |||
| * Bucket List | |||
| <syntaxhighlight lang="mysql"> | |||
| influx bucket list --token R0xKoH7_r6w9lpkrTzQtwpeLCP82ZMfF3WDAftUtmFUpDgE0Wdq4GV1w6hozryht0h-gO4ypGn7TaE7V_frd-A= | |||
| </syntaxhighlight> | |||
| * User List | |||
| <syntaxhighlight lang="mysql"> | |||
| influx user list --token R0xKoH7_r6w9lpkrTzQtwpeLCP82ZMfF3WDAftUtmFUpDgE0Wdq4GV1w6hozryht0h-gO4ypGn7TaE7V_frd-A= | |||
| </syntaxhighlight> | |||
| === Force listen on local IP === | |||
| <pre> | |||
| [http] | |||
|    bind-address = ."192.168.1.10" | |||
| </pre> | |||
| === Connect to  a specific host === | |||
| <syntaxhighlight lang="mysql"> | |||
| influx -host  myInfluxHost | |||
| </syntaxhighlight> | |||
| === Create Admin User === | === Create Admin User === | ||
| <pre>influx</pre> | <pre>influx</pre> | ||
| <syntaxhighlight lang="mysql">CREATE USER myAdmin WITH PASSWORD 'myPassword' WITH ALL PRIVILEGES </syntaxhighlight> | <syntaxhighlight lang="mysql"> | ||
| CREATE USER myAdmin WITH PASSWORD 'myPassword' WITH ALL PRIVILEGES | |||
| </syntaxhighlight> | |||
| === Enable Authenticatification === | |||
| <pre> | |||
| [http] | |||
|    auth-enabled = true | |||
| </pre> | |||
| == Use Database == | |||
| === Connect === | |||
| * Authentification | |||
| <syntaxhighlight lang="mysql"> | |||
| auth | |||
|    username: | |||
|    password: | |||
| </syntaxhighlight> | |||
| === Create Database === | |||
| <syntaxhighlight lang="mysql"> | |||
| CREATE DATABASE database_name | |||
| CREATE RETENTION POLICY "two_days" ON "myDatabase" DURATION 2d REPLICATION 1 | |||
| SHOW DATABASES | |||
| </syntaxhighlight> | |||
| ===  | === Manage Users === | ||
| < | ==== Create user ==== | ||
| <syntaxhighlight lang="mysql"> | |||
| CREATE USER myAdmin WITH PASSWORD 'myPassword' | |||
| </syntaxhighlight> | |||
| ==  | ==== Change Passsword ==== | ||
| <syntaxhighlight lang="mysql"> | |||
| < | SET PASSWORD FOR myUser = 'myPassword' | ||
| <syntaxhighlight lang="mysql"> | </syntaxhighlight> | ||
| <syntaxhighlight lang="mysql"> | |||
| ==== Show users ==== | |||
| <syntaxhighlight lang="mysql"> | |||
| SHOW USERS | |||
| </syntaxhighlight> | |||
| === Manage Acces Rights === | |||
| ==== Grant user to Database ==== | |||
| <syntaxhighlight lang="mysql"> | |||
| GRANT All ON "myDatabase" TO "myUser" | |||
| </syntaxhighlight> | |||
| * Use Database | |||
| <syntaxhighlight lang="mysql"> | |||
| use myDatabase | |||
| </syntaxhighlight> | |||
Latest revision as of 03:08, 3 January 2023
Influx
Initial Setup
Gui Admin
Influxdb Admin: http://localhost:8086
Command Line
- Organization List
influx org list --token R0xKoH7_r6w9lpkrTzQtwpeLCP82ZMfF3WDAftUtmFUpDgE0Wdq4GV1w6hozryht0h-gO4ypGn7TaE7V_frd-A=
- Bucket List
influx bucket list --token R0xKoH7_r6w9lpkrTzQtwpeLCP82ZMfF3WDAftUtmFUpDgE0Wdq4GV1w6hozryht0h-gO4ypGn7TaE7V_frd-A=
- User List
influx user list --token R0xKoH7_r6w9lpkrTzQtwpeLCP82ZMfF3WDAftUtmFUpDgE0Wdq4GV1w6hozryht0h-gO4ypGn7TaE7V_frd-A=
Force listen on local IP
[http] bind-address = ."192.168.1.10"
Connect to a specific host
influx -host  myInfluxHost
Create Admin User
influx
CREATE USER myAdmin WITH PASSWORD 'myPassword' WITH ALL PRIVILEGES
Enable Authenticatification
[http] auth-enabled = true
Use Database
Connect
- Authentification
auth
   username:
   password:
Create Database
CREATE DATABASE database_name
CREATE RETENTION POLICY "two_days" ON "myDatabase" DURATION 2d REPLICATION 1
SHOW DATABASES
Manage Users
Create user
CREATE USER myAdmin WITH PASSWORD 'myPassword'
Change Passsword
SET PASSWORD FOR myUser = 'myPassword'
Show users
SHOW USERS
Manage Acces Rights
Grant user to Database
GRANT All ON "myDatabase" TO "myUser"
- Use Database
use myDatabase