This file contains hidden or 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
FIELDS = ['cmd', 'command', 'start', 'end', 'delta', 'msg', 'stdout', 'stderr'] | |
def human_log(res): | |
if type(res) == type(dict()): | |
for field in FIELDS: | |
if field in res.keys(): | |
encoded_field = res[field].encode('utf-8') | |
print '\n{0}:\n{1}'.format(field, encoded_field) |
This file contains hidden or 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
template(name="ls_json" type="list" option.json="on") { | |
constant(value="{") | |
constant(value="\"@timestamp\":\"") property(name="timereported" dateFormat="rfc3339") | |
constant(value="\",\"@version\":\"1") | |
constant(value="\",\"message\":\"") property(name="msg") | |
constant(value="\",\"host\":\"") property(name="hostname") | |
constant(value="\",\"severity\":\"") property(name="syslogseverity-text") | |
constant(value="\",\"facility\":\"") property(name="syslogfacility-text") | |
constant(value="\",\"programname\":\"") property(name="programname") | |
constant(value="\",\"procid\":\"") property(name="procid") |
This file contains hidden or 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
# remount /dev/shm | |
execute "remount_shm" do | |
action :nothing | |
command "mount -o remount /dev/shm" | |
end | |
# set noexec for /dev/shm | |
bash "shm_noexec" do | |
user "root" | |
cwd "/etc" |
This file contains hidden or 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
#~/.bash_profile | |
alias mt='multitail -CS php' | |
#~/.multitailrc | |
# See documentation | |
# keetweej.vanheusden.com/svn/multitail/trunk/multitail.conf | |
# | |
# Get this file right! If you don't multitail will just crash. | |
# No warning, no error, just won't start. And it's your fault. |