TICK Stands For Telegraf, InfluxDB, Chronograf, Kapacitor. Telegraf is data collector, InfluxDB stores data, Chronograf is visualizer and Kapacitor is alerter. For moderate load, you’ll need minimum GB RAM cloud server instance or better – a hexacore 32GB RAM dedicated server. You can use VPSDime’s for cheap instance for testing for a month. For one time installation and deletion of instance, any cloud server service is enough good. Here is how to install TICK stack on Ubuntu, CentOS for system metrics monitoring. This guide is intended for slightly advanced users who already know how to setup a blank server and are comfortable with SSH.
How To Install TICK Stack on Ubuntu, CentOS
InfluxDB has official guide too :
1 | https://docs.influxdata.com/influxdb/v0.9/introduction/installation/ |
We are only writing for Ubuntu as we tested on Ubuntu 16.04 and basically CentOS practically similar from the point of commands. We need SMTP server for sending alerts, we can install sendmail :
---
1 2 3 | apt update apt upgrade apt install sendmail |
Now run these three commands one by one to add repository :
1 2 3 | curl -sL https://repos.influxdata.com/influxdb.key | sudo apt-key add - source /etc/lsb-release echo "deb https://repos.influxdata.com/${DISTRIB_ID,,} ${DISTRIB_CODENAME} stable" | sudo tee /etc/apt/sources.list.d/influxdb.list |
For CentOS the same step to add repository would be :
1 2 3 4 5 6 7 8 | cat <<EOF | sudo tee /etc/yum.repos.d/influxdb.repo [influxdb] name = InfluxDB Repository - RHEL $releasever baseurl = https://repos.influxdata.com/rhel/$releasever/$basearch/stable enabled = 1 gpgcheck = 1 gpgkey = https://repos.influxdata.com/influxdb.key EOF |
Update the system :
1 2 | apt update apt upgrade |
Now run :
1 2 3 | apt install influxdb systemctl start influxdb systemctl status influxdb |
This command starts influxDB :
1 | influx |
infuxDB console looks like this :
1 2 3 | Connected to http://localhost:8086 version 0.9 InfluxDB shell 0.9 > |
Syntax for influxDB is like MySQL, we can create user named example
with example_password
with this syntax :
1 | CREATE USER "example" WITH PASSWORD 'example_password' WITH ALL PRIVILEGES |
We can see the users with show users
command and exit the console with exit
command. For easy setup, we can open this file :
1 | nano /etc/influxdb/influxdb.conf |
Find the line auth-enabled
and set the value to true
:
1 2 3 4 5 | ... [http] ... # Determines whether HTTP authentication is enabled. auth-enabled = true |
For detailed, accurate method, you should read “Generate a configuration file” here :
1 | https://docs.influxdata.com/influxdb/v0.9/introduction/installation/ |
Restart infuxDB :
1 | systemctl restart influxdb |
We need to install the other parts :
1 | apt install telegraf kapacitor |
You’ll get latest version of Chronograf here :
1 | https://portal.influxdata.com/downloads |
You have to install in this way :
1 2 | wget https://dl.influxdata.com/chronograf/releases/chronograf_1.3.7.0_amd64.deb sudo dpkg -i chronograf_1.3.7.0_amd64.deb |
Open :
1 | nano /etc/telegraf/telegraf.conf |
Find [outputs.influxdb]
stanza and use the username and password of database :
1 2 3 4 5 6 | ## If not provided, will default to 5s. 0s means no timeout (not recommended). timeout = "5s" username = "example" password = "example_password" ## Set the user agent for HTTP POSTs (can be useful for log differentiation) # user_agent = "telegraf" |
Run :
1 2 | systemctl restart telegraf systemctl status telegraf |
Open :
1 | nano /etc/kapacitor/kapacitor.conf |
Find [[influxdb]]
stanza and use the username and password of database of influxDB :
1 2 3 4 5 6 7 8 | # Using InfluxDB is not required and can be disabled. enabled = true default = true name = "localhost" urls = ["http://localhost:8086"] username = "example" password = "example_password" ... |
Run :
1 2 3 | sudo systemctl start kapacitor systemctl status kapacitor systemctl start chronograf |
Now visit the Chronograf interface on browser located at http://your.server.ip:8888
.
Use the username and password for the InfluxDB database and click Connect New Source. Rest you’ll get on official website for configuring Kapacitor, Telegraf. Also look at their Github stuffs like :
1 | https://github.com/influxdata/tick-charts |