Skip to content

Instantly share code, notes, and snippets.

{
graphitePort: 2003,
graphiteHost: "localhost",
port: 8125,
mgmt_port: 8126,
flushInterval: 10000,
deleteCounters: true,
percentThreshold: [90, 95, 99],
graphite: {
legacyNamespace: false,
#cat /etc/init/statsd.conf
description "StatsD"
author "Etsy"
start on (filesystem and net-device-up)
stop on runlevel [!2345]
respawn
respawn limit 5 30
statsd {
tags => [ "apache-accesslog" ]
fields => [ "appname", "latency" ]
host => "statsd"
port => 8125
ignore_older_than => 5
namespace => "apache"
sender => "%{appenv}"
increment => [ "latency.%{appname}.%{latency}" ]
timing => [ "duration.%{appname}", "%{duration}",
#!/bin/bash
GIT_DIR=$(git rev-parse --git-dir 2>/dev/null)
if [ -z "$GIT_DIR" ]; then
echo >&2 "fatal: hooks/functions: GIT_DIR not set"
exit 1
fi
read oldrev newrev refname
@piavlo
piavlo / client side
Created June 13, 2013 15:28
how to set sensu check defaults and override them per client as needed instead of defining whole check on client side , so ultimately this way the only checks than need to be defined on client side are standalone checks
/etc/sensu/conf.d/checks/thresholds/logstash-elasticsearch.json
{
"client": {
"params": {
"cpu": {
"warning": 80,
"critical": 90
},
"iowait": {
def perform!
super
invoke_flush! if invoke_flush
disable_flushing!(true) if disable_flushing
begin
unless backup_all?
invoke_close! if invoke_close
end
copy!
deb_hold_packages() {
for pkg in $*; do
aptitude hold $pkg
echo $pkg hold | /usr/bin/dpkg --set-selections
done
}
deb_installnoninteractive() {
logger -is -p local1.notice -t ec2bootstrap "installing deb package $*"
env DEBIAN_FRONTEND=noninteractive aptitude install -o Dpkg::Options::='--force-confdef' -o Dpkg::Options::='--force-confold' -f -q -y $*
#! /bin/bash
#
# This script needs "fpm". If you dont have it,
# run "gem install fpm"
#
# You also need to "apt-get install python-setuptools" (otherwise fpm fails)
clean() {
rm -rf whisper-0.9.10 carbon-0.9.10 graphite-web-0.9.10
[
{rabbit, [
{ssl_listeners, [5671]},
{ssl_options, [{cacertfile,"/etc/rabbitmq/ssl/cacert.pem"},
{certfile,"/etc/rabbitmq/ssl/server_cert.pem"},
{keyfile,"/etc/rabbitmq/ssl/server_key.pem"},
{verify,verify_peer},
{fail_if_no_peer_cert,true}]}
]},
{rabbitmq_stomp, [{tcp_listeners, [61613]},
{
"handlers": {
"logevent": {
"type": "extension",
"handle_flapping": true
}
},
"logevent": {
"eventdir": "/var/log/sensu/events",
"keep": 10