Skip to content

Instantly share code, notes, and snippets.

@dblessing
dblessing / gist:5366296
Last active December 16, 2015 02:59
Redis input
input {
redis {
format => "json_event"
host => "redisops1.somedomainthatidontown.com"
type => "redis"
}
}
/usr/lib/jvm/java-1.7.0-sun/bin/java -Xms6144m -Xmx6144m -jar logstash-1.1.9-monolithic.jar agent --config /etc/logstash/conf.d/ --log /var/log/logstash/logstash.log --grok-patterns-path /opt/logstash/patterns
STRING:/srv/tomcat/mycontainer/logs/catalina.out
GROK:/srv/tomcat/%{WORD:container}/logs/catalina.out
yields
@fields.container: 'mycontainer'
@dblessing
dblessing / gist:5390448
Created April 15, 2013 19:00
passenger.conf
# The passenger module path should match ruby gem version
PassengerRoot /usr/lib/ruby/gems/1.8/gems/passenger-3.0.12
PassengerRuby /usr/bin/ruby
# Recommended Passenger Configuration
PassengerHighPerformance on
PassengerUseGlobalQueue on
# PassengerMaxPoolSize control number of application instances,
# typically 1.5x the number of processor cores.
PassengerMaxPoolSize 3
# Restart ruby process after handling specific number of request to resolve MRI memory leak.
# Apache handles the SSL encryption and decryption. It replaces webrick and listens by default on 8140
Listen 8140
<VirtualHost *:8140>
SSLEngine on
SSLProtocol -ALL +SSLv3 +TLSv1
SSLCipherSuite ALL:!ADH:RC4+RSA:+HIGH:+MEDIUM:-LOW:-SSLv2:-EXP
SSLCertificateFile /var/lib/puppet/ssl/certs/puppet3.example.com.pem
SSLCertificateKeyFile /var/lib/puppet/ssl/private_keys/puppet3.example.com.pem
@dblessing
dblessing / gist:5390458
Created April 15, 2013 19:01
config.ru
# a config.ru, for use with every rack-compatible webserver.
# SSL needs to be handled outside this, though.
# if puppet is not in your RUBYLIB:
# $LOAD_PATH.unshift('/opt/puppet/lib')
$0 = "master"
# if you want debugging:
# ARGV << "--debug"
filter {
grep {
add_tag => ['failed']
drop => false
match => ['@message', 'fail']
}
}
Generating bulk indexable shakespeare lines with timestamp 6 hours in the past and 24ish hours into the future
./load.sh: line 3: node: command not found
Setting mapping for shakespeare index
curl: (7) couldn't connect to host
Performing bulk indexing into localhost:9200
curl: (7) couldn't connect to host
If tons of JSON just scrolled above, I've probably successfully loaded over 100,000 lines of shakespeare into localhost:9200/shakespeare
# bind 'tcp://0.0.0.0:9292'
bind "unix://#{application_path}/tmp/sockets/gitlab.socket"
%div{class: user_color_scheme_class}
= raw @snippet.colorize(formatter: :gitlab)