Web application that retrieves process metrics using components of TICK stack in real time, and stores in InfluxDB thereby providing alerts when metrics values reach threshold, analyse and visualize the data.
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
sudo apt-get update && sudo apt-get install influxdb
sudo service influxdb start
Visit influx GUI at http://localhost:8083/
influx
You can play around with the influx db client.
brew install telegraf
or, sudo apt-get install telegraf
By default, it will start collecting all the cpu metrics and will write that to influxdb in a database called telegraf. Below is the list of measurements you should see.
measurements
name
cpu
disk
diskio
kernel
mem
processes
swap
system
telegraf.conf file is already present in the `telegraf` dir of the repo
telegraf -config telegraf.conf
\curl -sSL https://get.rvm.io | bash
rvm install 2.2.1
cd influx-time-series/Project
gem install sinatra
gem install twilio-ruby
First, make sure that telegraf is running!
cd influx-time-series/Project
ruby app.rb
Goto http://localhost:4567/
brew install kapacitor
For other systems, https://www.influxdata.com/downloads/#kapacitor
kapacitor.conf file is already present in the `kapacitor` dir of the repo
cd influx-time-series/kapacitor
kapacitord -config kapacitor.conf
Copy all .tick and .sh files in influx-time-series/kapacitor to /tmp dir
kapacitor define mem_alert -type stream -tick /tmp/mem_alert.tick -dbrp telegraf.autogen
kapacitor enable mem_alert
kapacitor define cpu_alert -type stream -tick /tmp/cpu_alert.tick -dbrp telegraf.autogen
kapacitor enable cpu_alert
Goto http://localhost:4567/alerts and set alert thresholds for mem and cpu
Alerts will start appearing on the /alerts page!
kapacitor disable mem_alert
kapacitor disable cpu_alert