Skip to content

Instantly share code, notes, and snippets.

highlight ExtraWhitespace ctermbg=red guibg=red
match ExtraWhitespace /\s\+$/
autocmd BufWinEnter * match ExtraWhitespace /\s\+$/
autocmd InsertEnter * match ExtraWhitespace /\s\+\%#\@<!$/
autocmd InsertLeave * match ExtraWhitespace /\s\+$/
autocmd BufWinLeave * call clearmatches()
logstash::filter::grok { 'grok-dearcadh':
pattern => ['%{TIMESTAMP_ISO8601:timestamp} \[%{GREEDYDATA:tomcat_info}\] %{LOGLEVEL} %{GREEDYDATA:class} - \[%{NUMBER:thread}\] %{GREEDYDATA:info}']
}
logstash::filter::date { 'date-dearcadh':
type => 'dearcadh-tomcat',
match => ['timestamp', 'ISO8601' ]
@mbarrin
mbarrin / gist:6883526
Created October 8, 2013 11:52
docker inspect output
precise64 ➜ ~ docker inspect 6394737ab9b2
[{
"ID": "6394737ab9b2a3c9d5fc1fd48bb9fbcdce9e6fa7aae198acc9e673fd5e306be0",
"Created": "2013-10-08T11:49:37.587187572Z",
"Path": "/bin/bash",
"Args": [],
"Config": {
"Hostname": "6394737ab9b2",
"Domainname": "",
"User": "",
6:00pm-6:45pm- Registration, Food and Drinks
6:45pm-7:15pm- Technical Talk with Q&A by Pedro Canahuati (Director of Production Engineering and Site Reliability Operations)
7:15pm-7:45pm-Traffic Infrastructure Technical Talk with Q&A by Adam Lazur (Production Engineering Manager)
7:45pm-8:15pm- Facebook Photos Storage Technical Talk with Q&A by Cory Hill (Production Engineer)
8:15pm-9:30pm- Infra Project Poster Sessions with our engineering teams
- hosts: 127.0.0.1
connection: local
vars:
--------
#!/bin/bash -ex
yum install java-1.7.0-openjdk-devel.x86_64 -y
yum install git -y
yum remove java-1.6.0-openjdk.x86_64 -y
#### Install Seyren ####
cd /opt
#!/bin/bash
logfile=/home/ec2-user/seyren_restarter.log
exec >> $logfile 2>&1
cd /opt/
cd seyren
# kill the jetty/java process
kill -9 `pidof java`
Fri Mar 21 15:54:54 2014 :: Exception Caught
Traceback (most recent call last):
File "/opt/graphite/webapp/graphite/render/datalib.py", line 231, in fetchData
cachedResults = CarbonLink.query(dbFile.real_metric)
File "/opt/graphite/webapp/graphite/render/datalib.py", line 140, in query
results = self.send_request(request)
File "/opt/graphite/webapp/graphite/render/datalib.py", line 166, in send_request
result = self.recv_response(conn)
File "/opt/graphite/webapp/graphite/render/datalib.py", line 181, in recv_response
return unpickle.loads(body)
@mbarrin
mbarrin / gist:856e259125e6ea684739
Created August 28, 2014 09:20
docker iptables
matthew@clipping ➜ 0 ~ sudo iptables -L -n -t nat
Chain PREROUTING (policy ACCEPT)
target prot opt source destination
REDIRECT tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:80 redir ports 20559
REDIRECT tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:443 redir ports 20558
DOCKER all -- 0.0.0.0/0 0.0.0.0/0 ADDRTYPE match dst-type LOCAL
Chain INPUT (policy ACCEPT)
target prot opt source destination
filter {
grok {
pattern => [ "message", "%{GREEDYDATA:index}" ]
}
}
output {
elasticsearch {
host => "localhost"
flush_size => 1