Create topcis.json
{
"version": 1,
"topics": [
{ "topic": "my-sample-topic"
#!/usr/bin/env bash | |
for i in $(docker ps -q);do | |
echo "Container $i" | |
docker inspect -f '{{ json .Mounts }}' $i | python -m json.tool | |
echo "-------------------" | |
done |
FILE SPACING: | |
# double space a file | |
sed G | |
# double space a file which already has blank lines in it. Output file | |
# should contain no more than one blank line between lines of text. | |
sed '/^$/d;G' |
# https://www.percona.com/blog/2008/11/07/poor-mans-query-logging/ | |
tcpdump -i eth0 -s 0 -l -w - dst port 3306 | strings | perl -e ' | |
while(<>) { chomp; next if /^[^ ]+[ ]*$/; | |
if(/^(SELECT|UPDATE|DELETE|INSERT|SET|COMMIT|ROLLBACK|CREATE|DROP|ALTER)/i) { | |
if (defined $q) { print "$q\n"; } | |
$q=$_; | |
} else { | |
$_ =~ s/^[ \t]+//; $q.=" $_"; | |
} |
########################################## | |
#### input | |
########################################## | |
# syslog logging | |
<source> | |
type tail | |
path /var/log/syslog, /var/log/auth.log, /var/log/kern.log | |
pos_file /tmp/td-agent/pos/syslog | |
refresh_interval 1 |
=== http status codes =================================================== | |
1xx Informational | |
100 Continue | |
101 Switching Protocols | |
102 Processing (WebDAV; RFC 2518) | |
2xx Success | |
200 OK | |
201 Created |
" _ _ " | |
" _ /|| . . ||\ _ " | |
" ( } \||D ' ' ' C||/ { % " | |
" | /\__,=_[_] ' . . ' [_]_=,__/\ |" | |
" |_\_ |----| |----| _/_|" | |
" | |/ | | | | \| |" | |
" | /_ | | | | _\ |" | |
It is all fun and games until someone gets hacked! |