Skip to content

Instantly share code, notes, and snippets.

@dysinger
dysinger / docker-ruby-fpm.sh
Last active August 29, 2015 13:56
Stop using rbenv & rvm on servers. plz. kthnx.
cat > Dockerfile <<\EOF
FROM ubuntu:12.04
RUN apt-get update
RUN apt-get install -y ruby1.9.3 build-essential \
libc6-dev libffi-dev libgdbm-dev libncurses5-dev \
libreadline-dev libssl-dev libyaml-dev zlib1g-dev
RUN gem install fpm --bindir=/usr/bin --no-rdoc --no-ri
RUN apt-get install -y curl
RUN curl ftp://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p484.tar.gz|tar oxzC /tmp
WORKDIR /tmp/ruby-1.9.3-p484
# We're going to use fpm to create the package.
# https://github.com/jordansissel/fpm
sudo gem install fpm
cd ~
# This is where we'll install the compiled collectd into
mkdir ~/collectd-package
# Get the source
msimmons@nagios:/opt/collectd/etc$ cat collectd.conf
# Generated by Puppet
#Hostname localhost
FQDNLookup true
#BaseDir "/var/lib/collectd"
#PluginDir "/usr/lib/collectd"
#TypesDB "/usr/share/collectd/types.db" "/etc/collectd/my_types.db"
Interval 10
@jbraeuer
jbraeuer / package-graphite.sh
Created February 1, 2012 08:43
Install graphite 0.9.9 on Ubuntu 11.10 using PACKAGES
#! /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.9 carbon-0.9.9 graphite-web-0.9.9
@zipkid
zipkid / hieradata.yaml
Created June 6, 2012 14:55
Using hiera as node classifier.
:hierarchy:
- Nodes/%{fqdn}
- Domain/%{domain}
- %{environment}
- common
:backends:
- yaml
- puppet
@lusis
lusis / 01-relp-rsyslog.conf
Last active November 19, 2015 10:25
nginx logstash cipher logging
$ModLoad omrelp
$RepeatedMsgReduction off
$template ls_json,"{\"@version\":1,\"es_environment\":\"dmz\",\"@timestamp\":\"%timestamp:1:19:date-rfc3339%.%timestamp:1:3:date-subseconds%+00:00\",%HOSTNAME:::jsonf:source_host%,\"message\":\"%timestamp% %app-name%:%msg:::json%\",%syslogfacility-text:::jsonf:facility%,%syslogseverity-text:::jsonf:severity%,%app-name:::jsonf:program%,%procid:::jsonf:processid%}"
*.* :omrelp:X.X.X.X:21514;ls_json
@lusis
lusis / package.txt
Created October 23, 2013 05:55
Status of the collectd omnibus megaplugin build
-rw-rw-r-- 1 vagrant vagrant 50M Oct 23 04:27 /var/cache/omnibus/pkg/collectd_5.4.0-1.ubuntu.12.04_amd64.deb
/*
* This file was autogenerated by puppet. Do not edit manually!
*
* snowflake Varnish Configuration for APT Cache
*/
/*
* Backend Servers (APT Repositories)
*/
<!-- note that this requires the rabbitmq management plugin -->
<!-- also requires collectd 5.1 with curl_json plugin support -->
<Plugin curl_json>
<URL "http://localhost:55672/api/overview">
Instance "rabbitmq_overview"
User "guest"
Password "guest"
<Key "message_stats/publish">
Type "counter"
</Key>
@untergeek
untergeek / fix_logstash-1.3.1_template.sh
Created December 18, 2013 20:49
This script will replace the elasticsearch mapping template named "logstash" (see line 3) and replace it with the below template from v1.3.2, which is currently at https://github.com/logstash/logstash/blob/master/lib/logstash/outputs/elasticsearch/elasticsearch-template.json This template will fix the error LOGSTASH-1711 and the "indexed without…
#!/bin/bash
curl -XDELETE http://localhost:9200/_template/logstash?pretty=true
echo
echo "Deleted current logstash template..."
echo "Creating new logstash template..."
sleep 2