Skip to content

Instantly share code, notes, and snippets.

@ioc32
ioc32 / es-json-logging.yml
Last active August 29, 2015 14:06
elasticsearch JSON logging
# See:
# - https://github.com/logstash/log4j-jsonevent-layout
# - http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/setup-configuration.html#logging
# - http://www.elasticsearch.org/guide/en/elasticsearch/guide/current/_logging.html
es.logger.level: INFO
rootLogger: ${es.logger.level}, console, json
logger:
# log action execution errors for easier debugging
action: DEBUG
@ioc32
ioc32 / heka.sample.toml
Created September 2, 2014 15:00
heka TOML samples
[vagrant@hekad heka]$ cat global.toml
[hekad]
maxprocs = 1
pid_file = "/var/run/hekad.pid"
# heka needs rw
base_dir = "/var/cache/hekad"
# heka needs ro
share_dir = "/usr/share/heka"
[DashboardOutput]
@ioc32
ioc32 / getdns-python-bindings.log
Created August 25, 2014 10:44
getdns-python-bindings compiles
(fix-compilation)iortiz@rigel:~/Code/git/getdns-python-bindings
$ python setup.py build_ext --inplace
running build_ext
building 'getdns' extension
cc -fno-strict-aliasing -fno-common -dynamic -g -Os -pipe -fno-common -fno-strict-aliasing -fwrapv -DENABLE_DTRACE -DMACOSX -DNDEBUG -Wall -Wstrict-prototypes -Wshorten-64-to-32 -DNDEBUG -g -fwrapv -Os -Wall -Wstrict-prototypes -DENABLE_DTRACE -pipe -arch x86_64 -I/usr/local/include -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c getdns.c -o build/temp.macosx-10.9-intel-2.7/getdns.o
getdns.c:244:82: warning: implicit conversion loses integer precision: 'getdns_transaction_t'
(aka 'unsigned long long') to 'int' [-Wshorten-64-to-32]
blob->type, blob->extensions, blob->userarg, blob->tid,
~~~~~~^~~
getdns.c:405:33: warning: implicit conversion loses integer precision: 'long' to 'int' [-Wshorten-64-to-32]
@ioc32
ioc32 / getdns-python-bindings.broken.log
Created August 25, 2014 10:44
getdns-python-bindings fails to compile
(master)iortiz@rigel:~/Code/git/getdns-python-bindings
$ python setup.py build_ext --inplace
running build_ext
building 'getdns' extension
creating build
creating build/temp.macosx-10.9-intel-2.7
cc -fno-strict-aliasing -fno-common -dynamic -g -Os -pipe -fno-common -fno-strict-aliasing -fwrapv -DENABLE_DTRACE -DMACOSX -DNDEBUG -Wall -Wstrict-prototypes -Wshorten-64-to-32 -DNDEBUG -g -fwrapv -Os -Wall -Wstrict-prototypes -DENABLE_DTRACE -pipe -arch x86_64 -I/usr/local/include -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c getdns.c -o build/temp.macosx-10.9-intel-2.7/getdns.o
getdns.c:242:82: warning: implicit conversion loses integer precision: 'getdns_transaction_t'
(aka 'unsigned long long') to 'int' [-Wshorten-64-to-32]
blob->type, blob->extensions, blob->userarg, blob->tid,
@ioc32
ioc32 / rsyslog-vagrant.test
Last active August 29, 2015 14:02
rsyslog 8.2 and elasticsearch 1.2
[root@s2 etc]# cat rsyslog.conf
#### GLOBAL DIRECTIVES ####
# Use default timestamp format
$ActionFileDefaultTemplate RSYSLOG_TraditionalFileFormat
$WorkDirectory /var/lib/rsyslog
$IncludeConfig /etc/rsyslog.d/*.conf
[root@s2 etc]# cat rsyslog.d/system-logs.conf
#### MODULES ####
@ioc32
ioc32 / gist:7571109
Created November 20, 2013 21:10
unbound-control stats
root@monet:~# unbound-control stats_noreset
thread0.num.queries=884
thread0.num.cachehits=9
thread0.num.cachemiss=875
thread0.num.prefetch=0
thread0.num.recursivereplies=875
thread0.requestlist.avg=182.583
thread0.requestlist.max=464
thread0.requestlist.overwritten=0
thread0.requestlist.exceeded=0
@ioc32
ioc32 / mptcpmeasurements
Created April 20, 2013 19:26
Multipath TCP deployability test results
http://multipath-tcp.org/pmwiki.php?n=Users.AboutMeasures
Script started on Sat Apr 20 13:48:04 2013
bash-3.2$ /usr/local/bin/mptcpmeasures start
[infos] download ok, launching script...
[global] Downloading the latest version
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 280M 100 280M 0 0 1140k 0 0:04:11 0:04:11 --:--:-- 1527k
0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
@ioc32
ioc32 / gist:4682088
Created January 31, 2013 10:51
l.root-servers id.server, traceroute
dtc@inigo:~$ dig -4 @l.root-servers.net ch txt id.server
; <<>> DiG 9.7.3 <<>> -4 @l.root-servers.net ch txt id.server
; (1 server found)
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 13547
;; flags: qr rd; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0
;; WARNING: recursion requested but not available
traceroute to ns3.msft.net (213.199.180.53), 30 hops max, 60 byte packets
1 red406.c3-1.solucionesdinamicas.net (31.24.120.2) [AS6750] 3.165 ms 3.371 ms 3.551 ms
2 10.128.0.9 (10.128.0.9) [AS65534] 0.434 ms 0.409 ms 0.408 ms
3 r1mad1.core.init7.net (77.109.135.49) [AS13030] 0.480 ms 0.574 ms 0.664 ms
4 r1mad3.core.init7.net (77.109.140.242) [AS13030] 1.542 ms 1.568 ms 1.618 ms
5 r1vie1.core.init7.net (77.109.140.246) [AS13030] 42.837 ms 43.159 ms 43.161 ms
6 vix1.ntwk.msn.net (193.203.0.165) [AS1120] 36.108 ms 36.061 ms 36.060 ms
7 207.46.45.242 (207.46.45.242) [AS8075] 45.293 ms 45.244 ms 45.152 ms
8 xe-3-1-0-0.fra-96cbe-1a.ntwk.msn.net (207.46.42.12) [AS8075/AS8068] 43.513 ms 42.950 ms 42.982 ms
9 ge-6-0-0-0.ams-64cb-1a.ntwk.msn.net (207.46.42.39) [AS8075/AS8068] 56.937 ms 47.190 ms 47.154 ms
ioc@inigo:~$ dig -4 @127.0.0.1 +nssearch msn.com
SOA ns1.msft.net. msnhst.microsoft.com. 2012122601 1800 900 2419200 900 from server ns3.msft.net in 47 ms.
SOA ns1.msft.net. msnhst.microsoft.com. 2012122601 1800 900 2419200 900 from server ns5.msft.net in 180 ms.
SOA ns1.msft.net. msnhst.microsoft.com. 2012122601 1800 900 2419200 900 from server ns2.msft.net in 186 ms.
SOA ns1.msft.net. msnhst.microsoft.com. 2012122601 1800 900 2419200 900 from server ns1.msft.net in 198 ms.
SOA ns1.msft.net. msnhst.microsoft.com. 2012122601 1800 900 2419200 900 from server ns4.msft.net in 431 ms.
ioc@inigo:~$ dig -6 @::1 +nssearch msn.com
SOA ns1.msft.net. msnhst.microsoft.com. 2012122601 1800 900 2419200 900 from server ns5.msft.net in 109 ms.
SOA ns1.msft.net. msnhst.microsoft.com. 2012122601 1800 900 2419200 900 from server ns2.msft.net in 123 ms.
SOA ns1.msft.net. msnhst.microsoft.com. 2012122601 1800 900 2419200 900 from server ns1.msft.net in 173 ms.