📈 Scripts to configure various monitoring services on Ubuntu 14.04
Shell Python JavaScript
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
etc Improve Lumberjack SSL generation May 19, 2015
opt Add Cachet install script May 18, 2015
tests Improved Sentry test script Sep 9, 2014
usr Update Grafana to 2.0.2 May 13, 2015
.gitignore Cleaned up, fixed inconsistencies Jun 24, 2014
README.md Add Cachet install script May 18, 2015
Vagrantfile Standardize Vagrantfile May 13, 2015
clean.sh Normalized shell scripts Sep 29, 2014
configure-heka-router.sh Normalized shell scripts Sep 29, 2014
configure-logstash-indexer.sh Improve Lumberjack SSL generation May 19, 2015
configure-logstash-shipper.sh Normalized shell scripts Sep 29, 2014
configure-rabbitmq-sensu.sh Remove RabbitMQ SSL May 13, 2015
configure-repo-sensu.sh Remove RabbitMQ SSL May 13, 2015
configure-sensu-metrics-client.sh Normalized shell scripts Sep 29, 2014
configure-sensu-metrics-server.sh Normalized shell scripts Sep 29, 2014
env.sh Update Heka to 0.9.2 May 13, 2015
generate-lumberjack-ssl.sh Improve Lumberjack SSL generation May 19, 2015
install-all-client-lite.sh Normalized shell scripts Sep 29, 2014
install-all-client.sh Normalized shell scripts Sep 29, 2014
install-all-fluentd.sh Normalized shell scripts Sep 29, 2014
install-all-flume.sh Normalized shell scripts Sep 29, 2014
install-all-graylog.sh Update documentation May 13, 2015
install-all-heka.sh Normalized shell scripts Sep 29, 2014
install-all-influxdb.sh replace (non-existent) Sensu dashboard with Uchiwa for InfluxDB install Dec 11, 2014
install-all-opentsdb.sh Normalized shell scripts Sep 29, 2014
install-all-sentry.sh Normalized shell scripts Sep 29, 2014
install-all-server.sh Add Cachet install script May 18, 2015
install-cachet.sh Add Cachet install script May 18, 2015
install-elasticsearch-curator.sh Normalized shell scripts Sep 29, 2014
install-elasticsearch-hq.sh Normalized shell scripts Sep 29, 2014
install-elasticsearch.sh Bump Elasticsearch version May 13, 2015
install-flapjack.sh Parameterized version numbers Sep 29, 2014
install-fluentd.sh Normalized shell scripts Sep 29, 2014
install-flume.sh Parameterized version numbers Sep 29, 2014
install-grafana.sh Update Grafana to 2.0.2 May 13, 2015
install-graphite-carbon.sh Normalized shell scripts Sep 29, 2014
install-graphite-web.sh Normalized shell scripts Sep 29, 2014
install-graylog.sh Update Graylog to latest May 13, 2015
install-hbase.sh Parameterized version numbers Sep 29, 2014
install-heka.sh Parameterized version numbers Sep 29, 2014
install-influxdb.sh Pull up `with_retry` fix May 13, 2015
install-kibana.sh Fix verbose Kibana extraction May 13, 2015
install-logstash-forwarder.sh Improve Lumberjack SSL generation May 19, 2015
install-logstash.sh Parameterized version numbers Sep 29, 2014
install-memcached.sh Normalized shell scripts Sep 29, 2014
install-mongo.sh Normalized shell scripts Sep 29, 2014
install-mysql.sh Add Cachet install script May 18, 2015
install-opentsdb.sh Switch to stable OpenTSDB release May 13, 2015
install-postgresql.sh Normalized shell scripts Sep 29, 2014
install-rabbitmq.sh Remove unnecessary RabbitMQ restart May 13, 2015
install-redis.sh Remove unnecessary Redis configuration May 13, 2015
install-sensu-api.sh Normalized shell scripts Sep 29, 2014
install-sensu-client.sh Remove RabbitMQ SSL May 13, 2015
install-sensu-flapjack.sh Normalized shell scripts Sep 29, 2014
install-sensu-metrics-influxdb.sh Normalized shell scripts Sep 29, 2014
install-sensu-metrics-relay.sh Normalized shell scripts Sep 29, 2014
install-sensu-server.sh Remove RabbitMQ SSL May 13, 2015
install-sensu.sh Remove RabbitMQ SSL May 13, 2015
install-sentry.sh Update Sentry to latest May 13, 2015
install-statsd-proxy.sh Normalized shell scripts Sep 29, 2014
install-statsd.sh Normalized shell scripts Sep 29, 2014
install-statsite.sh Add Statsite install script May 18, 2015
install-tcollector.sh Normalized shell scripts Sep 29, 2014
install-tessera.sh Add Tessera install script May 18, 2015
install-uchiwa.sh Enable Uchiwa on startup May 19, 2015
install-zookeeper.sh Parameterized version numbers Sep 29, 2014
lumberjack-ssl.cnf Improve Lumberjack SSL generation May 19, 2015
util.sh Pull up `with_retry` fix May 13, 2015

README.md

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