Git Product home page Git Product logo

monitoring's Introduction

Monitoring

Set of scripts for evaluating various monitoring stacks (log aggregation, metrics collection, metrics correlation, etc.)

Currently, the following stacks can be installed.

This repository started off from the ideas on my Monitoring Everything blog series.

Goals

Scripts included in this project must:

  • Follow best practices for Ubuntu and the applications being installed
  • Document service boundaries (ports, sockets, etc.) and default credentials
  • Be as minimal as possible
  • Be as reusable as possible (middleware and persistence, for example, can be reused between applications)
  • Try to stay close to each application's defaults (specifically port numbers and file locations)

This makes it easier for people to solve issues during evaluation, as well as prepare for deploying the applications into staging and production environments.

I won't accept scripts for the following applications. These applications are either too old or too bloated for cloud monitoring.

  • Nagios
  • Zabbix

Contributing

Want to add additional scripts? Improve existing scenarios? Just fork it, and submit a pull request. It's that simple.

Usage

Two Vagrant boxes are provided with this script.

  • monitoring on 192.168.12.10
  • app1 on 192.168.12.11

The monitoring box is intended for the different monitoring stacks, while app1 is intended to try out clients.

Sensu/Logstash

The monitoring box provides the following:

For client nodes, it provides:

  • AMQP (TCP/5672)
  • AMQP over SSL (TCP/5671)
  • Redis (TCP/6379)
  • Statsd (UDP/8125)
  • Lumberjack receiver (TCP/5043)
  • Graphite line receiver (TCP/2013)
  • Graphite Pickle receiver (TCP/2014)

OpenTSDB

This package provides scripts to install OpenTSDB and TCollector. OpenTSDB depends on HBase, which is installed in pseudo-distributed mode alongside a standalone ZooKeeper.

vagrant up --no-provision monitoring
vagrant ssh monitoring
sudo -i
cd /vagrant && ./install-all-opentsdb.sh

This script also installs Grafana with the OpenTSDB backend configured. Elasticsearch is installed as a dashboard store for Grafana.

TCollector is installed on the monitoring host to provide some sample metrics. Note that this script can take more than 10 minutes to install, depending on your bandwidth.

To start collecting metrics from app1, simply SSH to it and run the following.

sudo -i
cd /vagrant && ./install-tcollector.sh

Sentry

This package provides scripts to install Sentry with the following configuration.

  • memcached
  • supervisord
  • Redis as work queue, update buffer and TSDB
  • PostgreSQL as node store

You can use the following to perform the installation.

vagrant up --no-provision monitoring
vagrant ssh monitoring
sudo -i
cd /vagrant && ./install-all-sentry.sh

After installation, the Sentry web interface should be available. Login with the username admin and the password secret.

Graylog

To install Graylog with the web interface, simply use the following.

vagrant up --no-provision monitoring
vagrant ssh monitoring
sudo -i
cd /vagrant && ./install-all-graylog.sh

After installation, you can access one the web interface. Use the username admin and the password password.

Heka

Heka was created by Mozilla as a lighter alternative to Logstash. This package provides scripts for installing a Heka router that outputs to Elasticsearch.

vagrant up --no-provision monitoring
vagrant ssh monitoring
sudo -i
cd /vagrant && ./install-all-heka.sh

This package provides the following:

InfluxDB

InfluxDB is an open-source distributed time series database with no external dependencies. This package provides scripts for using InfluxDB as a general replacement for Graphite. It will install Sensu and InfluxDB, configuring Sensu to relay metrics to InfluxDB.

vagrant up --no-provision monitoring
vagrant ssh monitoring
sudo -i
cd /vagrant && ./install-all-influxdb.sh

This package provides the following:

Use vagrant up app1 to start collecting metrics

Flume

Flume is a distributed, reliable, and available service for efficiently collecting, aggregating, and moving large amounts of log data. This package provides scripts for using Flume with Elasticsearch and receivers for Avro and Syslog protocols.

vagrant up --no-provision monitoring
vagrant ssh monitoring
sudo -i
cd /vagrant && ./install-all-flume.sh

This package provides the following:

  • Kibana
  • ElasticHQ
  • Avro input on 192.168.12.10 at TCP port 41414
  • Syslog input on 192.168.12.10 at TCP port 1514

When using Kibana, you will need to change the index pattern to [flume-]YYYY-MM-DD.

Fluentd

Fluentd is an open source data collector to unify log management. This package provides scripts for using Fluentd with Elasticsearch and receivers for Syslog and HTTP protocols.

vagrant up --no-provision monitoring
vagrant ssh monitoring
sudo -i
cd /vagrant && ./install-all-fluentd.sh

This package provides the following:

  • Kibana
  • ElasticHQ
  • HTTP input on 192.168.12.10 at TCP port 9880
  • Syslog input on 192.168.12.10 at TCP port 1514

Testing Syslog Receivers

To quickly test the functionality of a syslog-compatible receiver, you can use the logger command on Ubuntu.

message="hello world"

# With TCP syslog receiver
logger -n localhost -P 1514 $message

# With UDP syslog receiver
logger -n localhost -P 1514 -d $message

monitoring's People

Contributors

davidrupp avatar ianunruh avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

monitoring's Issues

Add scripts for evaluating InfluxDB

  1. Install InfluxDB
  2. Install Sensu
  3. Install sensu_influxdb_handler
  4. Install Grafana

This stack could turn out to be simpler than Graphite.

Skyline/Oculus compatibility could be maintained by simply having the WizardVan extension relay metrics directly to Skyline's Carbon receiver.

Many different metrics dashboards have InfluxDB compatibility.

Cache

If I may suggest a quick a cache may be usefull to quick try the differents setup.
eg VM1 => apt-cacher-ng
and /vagrant/repos (so next install we won't redownload)

GRAFANA_BASE_URL=http://grafanarel.s3.amazonaws.com
GRAFANA_TAR=grafana-1.5.3.tar.gz
GRAFANA_INST=/usr/share/grafana
cd /tmp
sudo mkdir -p $GRAFANA_INST
if [ "x$USE_CACHE" == "xtrue" ]; then
if [ ! -e $REPOS_PATH/$GRAFANA_TAR ]; then wget -P $REPOS_PATH $GRAFANA_BASE_URL/$GRAFANA_TAR; fi #let save it into repos for future use
sudo tar --strip-components=1 -xzf $REPOS_PATH/$GRAFANA_TAR -C $GRAFANA_INST
else
curl $GRAFANA_BASE_URL/$GRAFANA_TAR | sudo tar --strip-components=1 -xzv -C $GRAFANA_INST
fi

Verify and modernize scripts

It's been about 8 months since my last set of major commits to this project. Some things are way out of date and need to be verified that they're still in working order

  • Graylog
  • Sensu
  • Sentry
  • OpenTSDB
  • InfluxDB
  • Kibana
  • Elasticsearch
  • Logstash
  • Logstash forwarder
  • Grafana
  • Graphite
  • Flume
  • Fluentd
  • Statsd
  • Heka
  • Flapjack

Update package versions

Packages are generally installed using one of three ways in these scripts

  • Git clone from master branch
  • Fetching a package from a URL
  • Aptitude/dpkg

These should be reviewed and version numbers should be bumped to their latest stable releases. I know for sure that the following packages may be out of date:

  • Heka
  • Kibana
  • Grafana (1.5.3 in use, 1.6.0 available)
  • Graylog2

Use Uchiwa package

The Sensu repository now includes an omnibus package for Uchiwa that will make installation quicker and simpler

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.