Skip to content

Instantly share code, notes, and snippets.

@nickchappell
nickchappell / ubuntu_1304_puppet_master.sh
Created July 10, 2013 06:33
Ubuntu 13.04 Puppet master install shell script
#! /bin/bash
echo "Checking to see if the Puppet Labs apt repo needs to be added..."
if [ ! -f /home/vagrant/repos_added.txt ];
then
echo "Adding Puppet Labs apt repository..."
sudo wget -N http://apt.puppetlabs.com/puppetlabs-release-quantal.deb >/dev/null
sudo dpkg -i puppetlabs-release-quantal.deb >/dev/null
echo "Updating apt..."
sudo apt-get update >/dev/null
#! /bin/sh
#
# /etc/rc.d/init.d/logstash
#
# Starts Logstash as a daemon
#
# chkconfig: 2345 20 80
# description: Starts Logstash as a daemon
### BEGIN INIT INFO
#!/bin/bash
# Perform installation as root
# Install prereqs
yum -y install libcurl libcurl-devel rrdtool rrdtool-devel rrdtool-prel libgcrypt-devel gcc make gcc-c++
# Get Collectd, untar it, make it and install
wget http://collectd.org/files/collectd-5.4.1.tar.gz
tar zxvf collectd-5.4.1.tar.gz
@nickchappell
nickchappell / riemann.config
Last active January 11, 2017 18:02
Riemann config for Graphite input
; -*- mode: clojure; -*-
; vim: filetype=clojure
(logging/init {:file "/var/log/riemann/riemann.log"})
; Listen on the local interface over TCP (5555), UDP (5555), and websockets
; (5556)
(let [host "0.0.0.0"]
(tcp-server {:host host})
(udp-server {:host host})
(let [index (index)]
; Inbound events will be passed to the functions that come after (streams...
(streams
;This is one function. Index all events immediately.
index
;For each distinct host and service combination
(by [:host :service]
;Send events to InfluxDB
(influxdb
@nickchappell
nickchappell / gist:63c5dffc2c8b791ab64c
Created June 17, 2014 05:34
riemann influxdb config
(let [index (index)]
; Inbound events will be passed to the functions that come after (streams...
(streams
;This is one function. Index all events immediately.
index
;For each distinct host and service combination
(by [:host :service]
;Send events to InfluxDB
(influxdb
@nickchappell
nickchappell / icinga2_host_pupept.pp
Created July 10, 2014 05:24
Icinga 2 module host defined type example
#On the client machines being monitored:
@@icinga2::objects::host { $::fqdn:
display_name => $::fqdn,
ipv4_address => $::ipaddress_eth1,
target_dir => '/etc/icinga2/conf.d/hosts',
target_file_name => "${fqdn}.conf"
}
#on the Icinga 2 monitoring server:
@nickchappell
nickchappell / influxdb1.local_config.toml
Created July 23, 2014 16:10
InfluxDB cluster configs and logs
# Welcome to the InfluxDB configuration file.
# If hostname (on the OS) doesn't return a name that can be resolved by the other
# systems in the cluster, you'll have to set the hostname to an IP or something
# that can be resolved here.
hostname = "influxdb1.local"
bind-address = "0.0.0.0"
# Once every 24 hours InfluxDB will report anonymous data to m.influxdb.com
@nickchappell
nickchappell / gist:1c6fb668be0553e940c9
Created August 25, 2014 21:22
Enterprize word search
N O S H N T C A R T N O C G N I D A E R
O S F Z B V R D A O L T I H S E Z X L P
Y O T N E M N O R I V N E V Y W P Q O B
B F S U P P O R T I N G F R S A T I O D
E T K T A L C K Q S K B L E T W E B K E
Y W O N P E G C C E S M E C E Y R E I G
L A Y A P T H O L T H Y V O M L U G N N
L R E T R A S M A A O I E N R L T G G A
A E R L E R T P I U R Y L F W A C I F H
C V O U H A P A T T T O E I A R U N P C
Restarting the Apache and Nagios daemons:
```bash
sudo service httpd restart
sudo service nagios restart
```
Daniel Selans and Didp Kerabat are on-call.
I'll check to see if the Nagios web UI is avaiable and will check to see if the daemons are running.