This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function mapValues(obj, fn) { | |
return Object.keys(obj).reduce((result, key) => { | |
result[key] = fn(obj[key], key); | |
return result; | |
}, {}); | |
} | |
function pick(obj, fn) { | |
return Object.keys(obj).reduce((result, key) => { | |
if (fn(obj[key])) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
input { | |
exec { | |
type => "dstat" | |
command => "dstat -cdngypms --nocolor 1 0" | |
interval => 13 | |
} | |
exec { | |
type => "apache-benchmark" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Create Key | |
openssl genrsa -des3 -out logstash.key 1024 | |
sudo openssl genrsa -des3 -out logstash.key 1024 | |
# Create CSR | |
openssl req -new -key logstash.key -out logstash.csr | |
sudo openssl req -new -key logstash.key -out logstash.csr | |
# Remove password from key | |
sudo openssl rsa -in logstash.key.org -out logstash.key | |
# Create certificate | |
sudo openssl x509 -req -days 365 -in logstash.csr -signkey server.key -out logstash.crt |