• Stars
    star
    279
  • Rank 147,223 (Top 3 %)
  • Language
    Shell
  • Created over 10 years ago
  • Updated over 9 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

📈 Scripts to configure various monitoring services on Ubuntu 14.04

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

More Repositories

1

ansible-role-active-directory

Ansible role for deploying Active Directory domain controllers
PowerShell
15
star
2

shelly-exporter

Prometheus exporter for Shelly Cloud devices
Go
13
star
3

import-from-twitter

Import Python modules from Twitter 🐍
Python
10
star
4

openstack-operator

OpenStack clouds at scale, running on Kubernetes (experimental)
Go
7
star
5

altocumulus

Integrate your Cumulus Linux switch with OpenStack Neutron
Python
5
star
6

ambient-exporter

Prometheus exporter for Ambient Weather devices
Go
5
star
7

juju-openstack-bootstrap

✨ Deploy Juju on your private OpenStack cloud
Python
5
star
8

immutable-infra-demo

Ansible + Packer + Terraform + Consul = <3
Shell
4
star
9

monitoring-ansible

📉 Ansible playbooks for testing monitoring stacks
Ruby
4
star
10

flask-api-skeleton

Boilerplate for a REST API built on Flask/SQLAlchemy
Python
4
star
11

cloudflare-ddns

Python dynamic DNS client for CloudFlare (v4 API)
Python
2
star
12

simple_es

Sandbox repository for event-sourcing in Ruby
Ruby
2
star
13

openstack-operator-images

Container images for openstack-operator
Dockerfile
2
star
14

docker-openstack

Dockerfiles for OpenStack Kilo services
Shell
2
star
15

puppet-multi-http

Puppet report handler that supports multiple HTTP URLs
Ruby
1
star
16

pyzendesk

Python
1
star
17

ianunruh.com

Source code behind ianunruh.com
CSS
1
star
18

ansible-openstack

Near-production, opinionated OpenStack Liberty
Python
1
star
19

zookeeper-ansible-terraform

Deploy ZooKeeper to DigitalOcean with Ansible and Terraform
Python
1
star
20

puppet-skyline

Puppet module for Etsy's Skyline
Puppet
1
star
21

ansible-mos-lab

Ansible playbooks for Mirantis OpenStack labs on ESXi/VyOS
Python
1
star