How to run InfluxDB with docker

How to run InfluxDB with docker

InfluxDB is a time series database built from the ground up to handle high write and query loads. InfluxDB is meant to be used as a backing store for any use case involving large amounts of timestamped data, including DevOps monitoring, application metrics, IoT sensor data, and real-time analytics.

Running the container

The InfluxDB image exposes a shared volume under /var/lib/influxdb, so you can mount a host directory to that point to access persisted container data. A typical invocation of the container might be:

$ docker run -p 8086:8086 \
    -v $PWD:/var/lib/influxdb \
    influxdb

 

Modify $PWD to the directory where you want to store data associated with the InfluxDB container.

You can also have Docker control the volume mount point by using a named volume.

$ docker run -p 8086:8086 \      
    -v influxdb:/var/lib/influxdb \      
    influxdb

Exposed Ports

The following ports are important and are used by InfluxDB.

  • 8086 HTTP API port

  • 8083 Administrator interface port, if it is enabled

  • 2003 Graphite support, if it is enabled

The HTTP API port will be automatically exposed when using docker run -P.

The administrator interface is not automatically exposed when using docker run -P and is disabled by default. The administrator interface requires that the web browser have access to InfluxDB on the same port in the container as from the web browser. Since -P exposes the HTTP port to the host on a random port, the administrator interface is not compatible with this setting.

The administrator interface is deprecated as of 1.1.0 and will be removed in 1.3.0.

InfluxDB can be either configured from a config file or using environment variables. To mount a configuration file and use it with the server, you can use this command:

Generate the default configuration file:

$ docker run --rm influxdb influxd config > influxdb.conf

Modify the default configuration, which will now be available under $PWD. Then start the InfluxDB container

$ docker run -p 8086:8086 \      
    -v $PWD/influxdb.conf:/etc/influxdb/influxdb.conf:ro \      
    influxdb -config /etc/influxdb/influxdb.conf

Modify $PWD to the directory where you want to store the configuration file.

For environment variables, the format is INFLUXDB_$SECTION_$NAME. All dashes (-) are replaced with underscores (_). If the variable isn’t in a section, then omit that part.

Examples:

INFLUXDB_REPORTING_DISABLED=true
INFLUXDB_META_DIR=/path/to/metadir
INFLUXDB_DATA_QUERY_LOG_ENABLED=false

 

مصطفی برمشوری

Just me, myself and I, exploring the universe of uknownment. I have a heart of love and a interest of lorem ipsum and mauris neque quam blog. I want to share my world with you.

Tags


Software development outsourcing: how to avoid contract loopholes

Signing a contract is the last stage in the vendor selection process. Once you have gone through the vendor evaluation and analysis activities, here comes the final step - forging a contract. To strike a win-win deal, businesses need to scrutinize the contract far and wide remaining no issue unsettled.

What is Outsourcing? 4 Common Things Companies Outsource

There has never been a better time to outsource work to other agencies in order to save money and/or time on projects that will give your business a boost. So what are some outsourcing examples for you to fully understand the scope of the trend?

Wordpress Professional Editorial Board

WordPress Professional Editorial Board is a dashboard to monitor and manage publications on your WordPress sites. You can manage posts for editing, reviewing and publishing on one or more WordPress sites through one integrated dashboard.

How to Design Website Footer to Engage More Visitor

Aside from the main body content, a website includes a header and footer, which serve a particular purpose to help visitors. We believe that website footer design is just as important. First of all let’s answer two vital questions: What is a website footer? What should be in the website footer?

How does a switch learn a MAC address which is not in its lookup table?

Suppose the Switch just started, and it received a frame that contains a destination MAC address for a network device not in its MAC addresses table. What happens then? We describe it briefly.

How to download videos from Linkedin?

Here I show you how to simply download videos from LinkedIn to share it on any other social media. It could be done only by the some simple steps. It does not need to install any tools other than your browser (Chrome or Firefox)

Questions? Chat with us!Support is online.Support is away.Chat with ViraWeb123 TeamChat with ViraWeb123 Team