Skip to content

Instantly share code, notes, and snippets.

Avatar

Dick Davies rasputnik

View GitHub Profile
@rasputnik
rasputnik / gist:8548388
Created Jan 21, 2014
overriding an existing resource with class inheritance
View gist:8548388
# modules/atlassian/manifests/gitfix.pp
class atlassian::gitfix inherits git::packages {
Package['git'] { ensure => absent }
}
@rasputnik
rasputnik / gist:8425116
Created Jan 14, 2014
postgresql 9.3 (transient) Dockerfile on centos6.
View gist:8425116
postgresql-9:$ cat Dockerfile
# postgresql 9 on centos 6.5
#
# docker build -t 'your/pg' <thisfile>
#
# then run with:
# docker run -P -d your/pg
# tweakables are the 'ENV' lines further down
# (if they were higher up they'd blow the cache)
@rasputnik
rasputnik / gist:8302058
Created Jan 7, 2014
redis dockerfile (sample)
View gist:8302058
# build image with:
#
# docker build -t 'your/redis' <directory holding this file>
#
# run with:
# docker run -P -name redis1 -d your/redis
FROM base
MAINTAINER Dick Davies <dick@hellooperator.net>
@rasputnik
rasputnik / gist:8275293
Last active Jan 2, 2016
dockerfile to run riemann on openjdk7 , centos6.5
View gist:8275293
# build up an openjdk stack on centos 6 to run riemann rpm
#
# docker build -t 'your/riemann' <thisfile>
#
# then run with:
# docker run -P -d your/riemann
FROM saltstack/centos-6-minimal
MAINTAINER Dick Davies <dick@hellooperator.net>
@rasputnik
rasputnik / gist:8257020
Last active Jan 2, 2016
Dirt simple riemann config to listen on all interfaces (so docker can map ports in).
View gist:8257020
(let [host "0.0.0.0"]
(tcp-server :host host)
(udp-server :host host)
(ws-server :host host))
@rasputnik
rasputnik / gist:7561122
Created Nov 20, 2013
how to build a statsd RPM using FPM.
View gist:7561122
# get required build bits
yum install -y jdk jruby nodejs rpm-build
# setup jruby (add /opt/jruby/bin to your path)
jgem install fpm
# checkout statsd
@rasputnik
rasputnik / gist:7334377
Created Nov 6, 2013
think this setup is wonky
View gist:7334377
(let [host "0.0.0.0"]
(tcp-server :host host)
(udp-server :host host)
(ws-server :host host))
; keep data for 5 minutes, just throw into index
(let [index (default :ttl 300 (update-index (index)))
graph (graphite {:host "graphite.cf.ac.uk"
:protocol :udp
:pool-size 10})]
@rasputnik
rasputnik / trappy.rb
Last active Dec 17, 2015
dropping this into $pluginpath/logstash/inputs/trappy.rb works for me. Just populate an external directory, then point the plugin at it with a "yamlmibdir" config option.
View trappy.rb
require "logstash/inputs/base"
require "logstash/namespace"
# Read snmp trap messages as events
#
# Resulting @message looks like :
# #<SNMP::SNMPv1_Trap:0x6f1a7a4 @varbind_list=[#<SNMP::VarBind:0x2d7bcd8f @value="teststring",
# @name=[1.11.12.13.14.15]>], @timestamp=#<SNMP::TimeTicks:0x1af47e9d @value=55>, @generic_trap=6,
# @enterprise=[1.2.3.4.5.6], @source_ip="127.0.0.1", @agent_addr=#<SNMP::IpAddress:0x29a4833e @value="\xC0\xC1\xC2\xC3">,
# @specific_trap=99>
@rasputnik
rasputnik / hotbunny.rb
Created Apr 29, 2013
Logstash hot_bunnies based AMQP output.
View hotbunny.rb
require "logstash/outputs/base"
require "logstash/namespace"
# Push events to a RabbitMQ exchange using the (JRuby-only) hot_bunnies library.
#
# This has been tested with hot_bunnies 1.5.0.
# find links to both here:
#
# * RabbitMQ - <http://www.rabbitmq.com/>
# * Hot Bunnies - <https://github.com/ruby-amqp/hot_bunnies>
View gist:5344106
Gem found matching: jruby-openssl (= 0.8.7)
Gem found matching: jruby-win32ole (>= 0)
Gem found matching: jdbc-mysql (>= 0)
Gem found matching: msgpack-jruby (>= 0)
Gem found matching: cinch (>= 0)
Gem found matching: spoon (>= 0)
Gem found matching: mocha (>= 0)
Gem found, but funky: shoulda (>= 0) (Unable to activate bourne-1.1.2, because mocha-0.13.3 conflicts with mocha (= 0.10.5))
Gem found matching: rspec (>= 0)
Gem found matching: insist (= 0.0.8)
You can’t perform that action at this time.