You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: influxdb/content.md
+31-24Lines changed: 31 additions & 24 deletions
Original file line number
Diff line number
Diff line change
@@ -9,8 +9,8 @@ For more information, visit https://influxdata.com.
9
9
10
10
%%LOGO%%
11
11
12
-
How to use this image for InfluxDB OSS v2
13
-
=========================================
12
+
How to use this image for InfluxDB v2
13
+
=====================================
14
14
15
15
**Quick start**: See the guide to [Install InfluxDB v2 for Docker](https://docs.influxdata.com/influxdb/v2/install/?t=Docker) and get started using InfluxDB v2.
16
16
@@ -453,7 +453,8 @@ How to use this image for InfluxDB v1
453
453
454
454
Use the InfluxDB Docker Hub image to run and set up an [InfluxDB 1.x](https://docs.influxdata.com/influxdb/v1/) container.
455
455
456
-
### Running the container
456
+
Running the container
457
+
---------------------
457
458
458
459
To start an InfluxDB 1.x container, enter the following command:
459
460
@@ -472,7 +473,8 @@ Replace `$PWD` with the host directory where you want InfluxDB to store data.
472
473
473
474
*Use Docker [Volumes](https://docs.docker.com/storage/volumes/) or [Bind mounts](https://docs.docker.com/storage/bind-mounts/) to persist InfluxDB [data and configuration directories](https://docs.influxdata.com/influxdb/v1/concepts/file-system-layout/).*
474
475
475
-
### Networking ports
476
+
Networking ports
477
+
----------------
476
478
477
479
InfluxDB uses the following networking ports:
478
480
@@ -481,11 +483,12 @@ InfluxDB uses the following networking ports:
481
483
482
484
Using the `docker run`[`-P, --publish-all` flag](https://docs.docker.com/reference/cli/docker/container/run/#publish-all) exposes the InfluxDB HTTP API to the host.
483
485
484
-
### Configure InfluxDB v1 in a container
486
+
Configure InfluxDB v1 in a container
487
+
------------------------------------
485
488
486
489
To configure InfluxDB v1 in a container, use a configuration file or environment variables.
487
490
488
-
####Use a configuration file
491
+
### Use a configuration file
489
492
490
493
To customize and mount a configuration file, do the following:
491
494
@@ -505,7 +508,7 @@ To customize and mount a configuration file, do the following:
505
508
506
509
Replace `$PWD` with the host directory where you want to store the configuration file.
507
510
508
-
####Use environment variables
511
+
### Use environment variables
509
512
510
513
Pass [`INFLUXDB_` environment variables](https://docs.influxdata.com/influxdb/v1/administration/config/#environment-variables) to override specific InfluxDB v1 configuration options. An environment variable overrides the equivalent option in the configuration file.
511
514
@@ -519,7 +522,8 @@ docker run -p 8086:8086 \
519
522
520
523
Learn more about [configuring InfluxDB v1](https://docs.influxdata.com/influxdb/v1.8/administration/config/).
521
524
522
-
### Graphite
525
+
Graphite
526
+
--------
523
527
524
528
InfluxDB supports the Graphite line protocol, but the service and ports are not exposed by default. To run InfluxDB with Graphite support enabled, you can either use a configuration file or set the appropriate environment variables. Run InfluxDB with the default Graphite configuration:
See the [README on GitHub](https://github.com/influxdata/influxdb/blob/master/services/graphite/README.md) for more detailed documentation to set up the Graphite service. In order to take advantage of graphite templates, you should use a configuration file by outputting a default configuration file using the steps above and modifying the `[[graphite]]` section.
Read more about this in the [official documentation](https://docs.influxdata.com/influxdb/latest/guides/writing_data/)
549
554
550
-
### CLI / SHELL
555
+
CLI / SHELL
556
+
-----------
551
557
552
558
Start the container:
553
559
@@ -567,61 +573,62 @@ Or run the influx client in a separate container:
567
573
docker run --rm --link=influxdb -it %%IMAGE%%:1.8 influx -host influxdb
568
574
```
569
575
570
-
### Database Initialization
576
+
Database Initialization
577
+
-----------------------
571
578
572
579
The InfluxDB image contains some extra functionality for initializing a database. These options are not suggested for production, but are quite useful when running standalone instances for testing.
573
580
574
581
The database initialization script will only be called when running `influxd`. It will not be executed when running any other program.
575
582
576
-
####Environment Variables
583
+
### Environment Variables
577
584
578
585
The InfluxDB image uses several environment variables to automatically configure certain parts of the server. They may significantly aid you in using this image.
579
586
580
-
#####INFLUXDB_DB
587
+
#### INFLUXDB_DB
581
588
582
589
Automatically initializes a database with the name of this environment variable.
583
590
584
-
#####INFLUXDB_HTTP_AUTH_ENABLED
591
+
#### INFLUXDB_HTTP_AUTH_ENABLED
585
592
586
593
Enables authentication. Either this must be set or `auth-enabled = true` must be set within the configuration file for any authentication related options below to work.
587
594
588
-
#####INFLUXDB_ADMIN_USER
595
+
#### INFLUXDB_ADMIN_USER
589
596
590
597
The name of the admin user to be created. If this is unset, no admin user is created.
591
598
592
-
#####INFLUXDB_ADMIN_PASSWORD
599
+
#### INFLUXDB_ADMIN_PASSWORD
593
600
594
601
The password for the admin user configured with `INFLUXDB_ADMIN_USER`. If this is unset, a random password is generated and printed to standard out.
595
602
596
-
#####INFLUXDB_USER
603
+
#### INFLUXDB_USER
597
604
598
605
The name of a user to be created with no privileges. If `INFLUXDB_DB` is set, this user will be granted read and write permissions for that database.
599
606
600
-
#####INFLUXDB_USER_PASSWORD
607
+
#### INFLUXDB_USER_PASSWORD
601
608
602
609
The password for the user configured with `INFLUXDB_USER`. If this is unset, a random password is generated and printed to standard out.
603
610
604
-
#####INFLUXDB_READ_USER
611
+
#### INFLUXDB_READ_USER
605
612
606
613
The name of a user to be created with read privileges on `INFLUXDB_DB`. If `INFLUXDB_DB` is not set, this user will have no granted permissions.
607
614
608
-
#####INFLUXDB_READ_USER_PASSWORD
615
+
#### INFLUXDB_READ_USER_PASSWORD
609
616
610
617
The password for the user configured with `INFLUXDB_READ_USER`. If this is unset, a random password is generated and printed to standard out.
611
618
612
-
#####INFLUXDB_WRITE_USER
619
+
#### INFLUXDB_WRITE_USER
613
620
614
621
The name of a user to be created with write privileges on `INFLUXDB_DB`. If `INFLUXDB_DB` is not set, this user will have no granted permissions.
615
622
616
-
#####INFLUXDB_WRITE_USER_PASSWORD
623
+
#### INFLUXDB_WRITE_USER_PASSWORD
617
624
618
625
The password for the user configured with `INFLUXDB_WRITE_USER`. If this is unset, a random password is generated and printed to standard out.
619
626
620
-
####Initialization Files
627
+
### Initialization Files
621
628
622
629
If the Docker image finds any files with the extensions `.sh` or `.iql` inside of the `/docker-entrypoint-initdb.d` folder, it will execute them. The order they are executed in is determined by the shell. This is usually alphabetical order.
623
630
624
-
####Manually Initializing the Database
631
+
### Manually Initializing the Database
625
632
626
633
To manually initialize the database and exit, the `/init-influxdb.sh` script can be used directly. It takes the same parameters as the `influxd run` command. As an example:
0 commit comments