Skip to content

Instantly share code, notes, and snippets.

View davewongillies's full-sized avatar

Dave Wongillies davewongillies

View GitHub Profile
@davewongillies
davewongillies / gist:2760696
Created May 21, 2012 06:02 — forked from haf/gist:1927153
Installing Graphite on Ubuntu 11.10 take 2
#number of seconds to use between flushing, default of 10, 1 for realtime
statsite_flush_interval=1
# 1 seconds * 1209600 datapoints = 2 week of 1 second granularity
# 10 seconds * 864000 datapoints = 2 months of 10-second granularity
# 60 seconds * 259200 datapoints = 6 months of 1-minute granularity
# 10 minutes * 262974 datapoints = ~3 years of 10-minute granularity
graphite_retentions='1:1209600,10:864000,60:259200,600:262974'
####################################
# BASIC REQUIREMENTS
@davewongillies
davewongillies / gist:2773166
Created May 23, 2012 03:50 — forked from chalmerj/gist:1492384
Init script for Graphite carbon-cache
#! /bin/sh
### BEGIN INIT INFO
# Provides: carbon-cache
# Required-Start: $remote_fs $syslog
# Required-Stop: $remote_fs $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: carbon-cache init script
# Description: An init script for Graphite's carbon-cache daemon.
### END INIT INFO
@davewongillies
davewongillies / graphline.sh
Created July 21, 2012 02:18 — forked from mrtazz/graphline.sh
shell function to quickly check a graphite graph
#
# shell function to print graphite graphs as sparklines in the terminal
# needs https://github.com/holman/spark
#
function graphline() {
GRAPHITEHOST="graphite.example.com"
if [ ! -n "$1" ]; then print "Usage: $0 metric [minutes]"; return 1; fi
if [ ! -n "$2" ]; then MINUTES=10 ; else MINUTES=$2; fi
curl -s "${GRAPHITEHOST}/render?from=-${MINUTES}minutes&target=${1}&format=raw" | cut -d"|" -f 2 | spark ;
}
@davewongillies
davewongillies / check_aws_status.rb
Created August 6, 2012 11:09 — forked from jbraeuer/check_aws_status.rb
A Nagios/Icinga plugin to check AWS Service Health Dashboard (using Ruby+Nokogiri)
#! /usr/bin/ruby
#
# A script to check Amazon Webservice's Health Status Dashboard
#
# Jens Braeuer, github.com/jbraeuer
#
# Version 1.0
#
@davewongillies
davewongillies / graphTemplates.conf
Created December 8, 2012 03:21
Better looking defaults for graphite
[default]
background = white
foreground = black
majorLine = grey
minorLine = rose
lineColors = 0fff00aa,0f337799,0f000077,ff000077
fontName = Helvetica
fontSize = 10
fontBold = False
fontItalic = False

On Mac OS X:

  • Install puppet 3.0.2, facter 1.6.17 and hiera 1.1.2
  • create /etc/puppet/puppet.conf
  • configure launchd puppet daemon
  • initial puppet run
global
log 127.0.0.1 local0
log 127.0.0.1 local1 notice
maxconn 4096
user haproxy
group haproxy
daemon
listen rabbitmq 0.0.0.0:5672
mode tcp
@davewongillies
davewongillies / ElasticSearch Quick Guide.md
Last active December 17, 2015 22:39 — forked from timconradinc/gist:5654473
ElasticSearch Quick Guide

ElasticSearch Quick Guide

ElasticSearch for Logstash Overview

There are two ways to send data to ElasticSearch from Logstash. The first is the 'elasticsearch' output and the other is the 'elasticsearch_http' output. In a nutshell, the 'elasticsearch' output is tightly coupled with your elasticsearch cluster, and the 'elasticsearch_http' output isn't.

description "Tomcat Server"
start on runlevel [2345]
stop on runlevel [!2345]
respawn
respawn limit 10 5
# run as non privileged user
# add user with this command:
## adduser --system --ingroup www-data --home /opt/apache-tomcat apache-tomcat
@davewongillies
davewongillies / production.ini.md
Last active December 18, 2015 01:39
Sentry Configuration for Rhodecode

Sentry Configuration for Rhodecode

Sentry is an alternative open source error aggregator. You must install python packages raven to enable.

The following settings go into your rhodecode production.ini

production.ini

################