Put flip
somewhere in your $PATH
and chmod a+x
it.
Copy fuck
into ~/.bashrc
.
#!/bin/bash | |
curl -XDELETE http://localhost:9200/_template/logstash?pretty=true | |
echo | |
echo "Deleted current logstash template..." | |
echo "Creating new logstash template..." | |
sleep 2 |
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 |
server { | |
listen 80 default; | |
server_name ~^(www\.)?(?<domain>.+)$; | |
root /srv/httpd/$domain/public_html/; | |
access_log /srv/httpd/$domain/logs/access.log; | |
location / { | |
index index.html index.htm index.php; |
# 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 |
{ | |
"template" : "logstash-*", | |
"settings" : { | |
"number_of_shards" : 5, | |
"index.refresh_interval" : "5s" | |
}, | |
"mappings" : { | |
"_default_" : { | |
"_all" : {"enabled" : true}, | |
"dynamic_templates" : [ { |
# define some variables | |
variable "aws_ubuntu_ami" { | |
default = "ami-972444ad" | |
} | |
variable "aws_keypair" { | |
default = "xxxx" | |
} | |
# AWS account details |
$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 |
{ | |
"AWSTemplateFormatVersion": "2010-09-09", | |
"Description": "CoreOS on EC2: http://coreos.com/docs/running-coreos/cloud-providers/ec2/", | |
"Mappings": { | |
"RegionMap": { | |
"ap-northeast-1": { | |
"AMI": "ami-f9b08ff8" | |
}, | |
"ap-southeast-1": { | |
"AMI": "ami-c24f6c90" |
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 |