GithubHelp home page GithubHelp logo

nagapandupotti / influx-syswatch Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 0.0 374 KB

Web application that retrieves process metrics using components of TICK stack in real time, and stores in InfluxDB thereby analyse and visualize the data, and providing alerts when metrics values reach threshold.

Ruby 6.66% JavaScript 12.58% HTML 80.75%

influx-syswatch's Introduction

influx-syswatch

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.

Steps to do.

Install InfluxDB

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
Start influx Server.
sudo service influxdb start

Visit influx GUI at http://localhost:8083/

Start influx client
influx

You can play around with the influx db client.

Install telegraf - The super cool data collector.

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

Generate telegraf config file

telegraf.conf file is already present in the `telegraf` dir of the repo

Run telegraf

telegraf -config telegraf.conf

Install rvm and ruby

\curl -sSL https://get.rvm.io | bash
rvm install 2.2.1

Install gems inside the project's rvm gemset

cd influx-time-series/Project
gem install sinatra
gem install twilio-ruby

Start sinatra server

First, make sure that telegraf is running!
cd influx-time-series/Project
ruby app.rb
Goto http://localhost:4567/

Install kapacitor

brew install kapacitor

For other systems, https://www.influxdata.com/downloads/#kapacitor

Generate kapacitor config file

kapacitor.conf file is already present in the `kapacitor` dir of the repo

Run kapacitor

cd influx-time-series/kapacitor
kapacitord -config kapacitor.conf

Set kapacitor alerts

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!

Disable kapacitor alerts

kapacitor disable mem_alert
kapacitor disable cpu_alert

influx-syswatch's People

Contributors

nagapandupotti avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.