SYSTEM MONITORING
Using Grafana,
InfluxDB and CollectD
By: Yogesh Jadhav
THE AGENDA:
- Why Graphical Monitoring?
- Grafana
- InfluxDB
- CollectD
- Configuration
- Demo
WHY GRAPHICAL MONITORING?
- Allows you to understand your system in a glance
- Easy to understand
- Easy to use
- Helps to detect bottlenecks quickly
Text
GRAFANA INTRODUCTION:
- Leading Open Source Solution for time series analytics.
- Provides dynamic dashboards.
- Provides alerting system.
- Provides notifications using email and slack like applications.
- Supports many data sources like InfluxDB, TimescaleDB and also data on rest.
- Supports User Management.
- Enterprise version available.
Text
GRAFANA INSTALLATION:
wget https://s3-us-west-2.amazonaws.com/grafana-releases/release/grafana-5.3.2-1.x86_64.rpm
sudo yum localinstall grafana-5.3.2-1.x86_64.rpm
Redhat / CentOS :
Ubuntu / Debian :
wget https://s3-us-west-2.amazonaws.com/grafana-releases/release/grafana_5.3.2_amd64.deb
sudo dpkg -i grafana_5.3.2_amd64.deb
Windows:
http://docs.grafana.org/installation/windows/
Text
GRAFANA INSTALLATION:
sudo service grafana-server start
Starting Grafana :
Stoping Grafana :
sudo service grafana-server stop
Start Grafana on boot:
$ sudo chkconfig --add grafana-server
Text
InfluxDB INTRODUCTION:
- Leading Open Source Time Series Database.
- Developed by InfluxData
- High Performance.
- SQL like Query Langauge.
- Easy to install and configure.
- Retention Policy.
- Native support for data collector plugins like telegraf, CollectD and OpenTSDB.
- Enterprise version available.
Text
InfluxDB INSTALLATION:
wget https://dl.influxdata.com/influxdb/releases/influxdb-1.6.4.x86_64.rpm
sudo yum localinstall influxdb-1.6.4.x86_64.rpm
Redhat / CentOS :
Ubuntu / Debian :
wget https://dl.influxdata.com/influxdb/releases/influxdb_1.6.4_amd64.deb
sudo dpkg -i influxdb_1.6.4_amd64.deb
Windows:
https://dl.influxdata.com/influxdb/releases/influxdb-1.6.4_windows_amd64.zip
unzip influxdb-1.6.4_windows_amd64.zip
Text
InfluxDB INSTALLATION:
service influxdb start
Starting InfluxDB :
Stopping InfluxDB :
service influxdb stop
Starting InfluxDB on boot:
$ sudo chkconfig --add influxdb
Text
CollectD INTRODUCTION
- Unix daemon
-
Collects metric from many sources like OS, Applications, Sensors, Log files.
- Light weight
-
Supports 100+ read and write plugins like CPU, Memory, PostgreSQL, Interface and Network
https://collectd.org/wiki/index.php/Table_of_Plugins
- Retention Policy.
- Native support for data collector plugins like telegraf, CollectD and OpenTSDB.
- Enterprise version available.
Text
CollectD INSTALLATION:
wget https://storage.googleapis.com/collectd-tarballs/collectd-5.8.1.tar.bz2
tar xf collectd-version.tar.bz2
cd collectd-version
./configure
make all install
Text
Text
CollectD INSTALLATION:
service collectd start
Starting InfluxDB :
Stopping InfluxDB :
service collectd stop
Starting InfluxDB on boot:
$ sudo chkconfig --add collectd
Configuration:
Grafana:
/etc/grafana/grafana.ini
admin user
admin
authentication type
In-built authentication
http_port
3000
http://docs.grafana.org/installation/configuration/
Configuration:
InfluxDB
/etc/influxdb/influxdb.conf
[data]
dir = "/var/lib/influxdb/data"
wal-dir = "/var/lib/influxdb/wal"
[retention]
# enabled = true
# check-interval = "30m"
[[collectd]]
enabled = true
bind-address = ":25826" #default UDP port for collectd
database = "collectd"
retention-policy = ""
typesdb = "/opt/collectd/share/collectd/types.db"
Configuration:
InfluxDB:
/etc/influxdb/influxdb.conf
[data]
dir = "/var/lib/influxdb/data"
wal-dir = "/var/lib/influxdb/wal"
[retention]
# enabled = true
# check-interval = "30m"
[[collectd]]
enabled = true
bind-address = ":25826" #default UDP port for collectd
database = "collectd"
retention-policy = ""
Configuration:
CollectD
/opt/collectd/etc/collectd.conf
Interval = 10
LoadPlugin cpu
LoadPlugin df
LoadPlugin disk
LoadPlugin interface
LoadPlugin uptime
LoadPlugin load
LoadPlugin memory
LoadPlugin processes
LoadPlugin swap
LoadPlugin users
LoadPlugin network
LoadPlugin postgresql
LoadPlugin "logfile"
<Plugin "logfile">
LogLevel "info"
File "/tmp/collectd.log"
Timestamp true
</Plugin>
include "/opt/collectd/etc/postgresql.conf"
<Plugin "network">
Server "127.0.0.1" "25826"
</Plugin>
include "/opt/collectd/etc/postgresql.conf"
MY SETUP:
deck
By Yogesh Jadhav YJ
deck
- 60