Getting Started with InfluxDB

What is InfluxDB?

A Basic description of InfluxDB

InfluxDB is an open-source schema-less Time-series database that specializes in the storage of time-series data for operations monitoring, application metrics, IoT sensors, and real-time analytics.

InfluxDB Installation

You can find the commands I used below in the official install guide:

Adding APT Sources

wget -qO- | sudo apt-key add -
source /etc/lsb-release
echo "deb${DISTRIB_ID,,} ${DISTRIB_CODENAME} stable" | sudo tee /etc/apt/sources.list.d/influxdb.list

Installing InfluxDB

sudo apt-get update && sudo apt-get install influxdb

Starting service

sudo service InfluxDB start

Installing Client

sudo apt-get update && sudo apt-get install influx

Database commands

Database command cheat sheet

#Connects to the InfluxDB

#Show databases
show databases

#Creates a database
create database devopsjourney

#Select database
USE devopsjourney

Measurement Commands

If you are familiar with SQL databases, measurements are like tables.

Measurement command cheat sheet

#Creating a Measurement
insert cpu,host=node1 value 10

#Showing Measurements
SHOW Measurements

# Selecting Measurements
select * from CPU

# Show Series of measurements
Show series