Skip to content

Instantly share code, notes, and snippets.

@oranie
oranie / sender_td-agent.conf
Created May 10, 2012 04:06
sender server td-agent.conf
<source>
type forward
port 24224
</source>
<source>
type tail
format /^(?<XFF-host>[^ ]*) (?<host>[^ ]*) [^ ]* (?<user>[^ ]*) \[(?<time>[^\]]*)\] "(?<method>\S+)(?: +(?<path>[^ ]*) +\S*)?" (?<status>[^ ]*) (?<size>[^ ]*)(?: "(?<referer>[^\"]*)" "(?<agent>[^\"]*)" (?<response_time>[^ ]*))?$/
time_format %d/%b/%Y:%H:%M:%S %z
@oranie
oranie / gist:2715983
Created May 17, 2012 03:22
GrowthForecast Error
draw graph failed: unknown option '--border' at /opt/git/GrowthForecast/lib/GrowthForecast/RRD.pm line 296.
at /usr/local/share/perl5/Kossy.pm line 126
Kossy::__ANON__('draw graph failed: unknown option \'--border\' at /opt/git/GrowthForecast/lib/GrowthForecast/RRD.pm line 296.^J') called at /usr/local/share/perl5/Try/Tiny.pm line 100
Try::Tiny::try('CODE(0x1f3f9b8)', 'Try::Tiny::Catch=REF(0x2373010)') called at /usr/local/share/perl5/Kossy.pm line 127
Kossy::__ANON__('HASH(0x234e2a0)') called at /usr/local/share/perl5/Plack/Middleware/Static.pm line 18
Plack::Middleware::Static::call('Plack::Middleware::Static=HASH(0x18acfd8)', 'HASH(0x234e2a0)') called at /usr/local/share/perl5/Plack/Component.pm line 39
Plack::Middleware::StackTrace::__ANON__ at /usr/local/share/perl5/Try/Tiny.pm line 71
eval {...} at /usr/local/share/perl5/Try/Tiny.pm line 67
Plack::Middleware::StackTrace::call('Plack::Middleware::StackTrace=HASH(0x196e3f0)', 'HASH(0x234e2a0)') cal
# perl Makefile.PL
# donwloading http://oss.oetiker.ch/rrdtool/pub/rrdtool.tar.gz
# => 304
# unpacking rrdtool.tar.gz
# rrdtool version 1.4.7
# witing Makefile
Created MYMETA.yml and MYMETA.json
Creating new 'Build' script for 'Alien-RRDtool' version '0.02'
@oranie
oranie / gist:2786251
Created May 25, 2012 06:51
flowcounter error
2012-05-25 15:50:26 +0900: starting fluentd-0.10.22
2012-05-25 15:50:26 +0900: reading config file path="/etc/td-agent/td-agent.conf"
2012-05-25 15:50:27 +0900: adding source type="tail"
2012-05-25 15:50:27 +0900: adding match pattern="apache.access.**" type="copy"
2012-05-25 15:50:27 +0900: adding match pattern="apache_result.**" type="copy"
2012-05-25 15:50:27 +0900: adding match pattern="traffic.**" type="copy"
2012-05-25 15:50:27 +0900: adding match pattern="fluent.**" type="file"
2012-05-25 15:50:27 +0900: adding match pattern="*.**" type="file"
2012-05-25 15:50:27 +0900: :buffer_chunk_limit(33554432) is large. Reset :buffer_chunk_limit with 10485760
2012-05-25 15:50:27 +0900: :buffer_chunk_limit(33554432) is large. Reset :buffer_chunk_limit with 10485760
[oranie@www6429ue td-agent]$ tail traffic.2012_05_25.b4c0d626aa8a451d9
2012-05-25T15:39:57+09:00 traffic.apache {"count":0,"bytes":0,"count_rate":0.0,"bytes_rate":0.0,"time":1337927997}
2012-05-25T15:40:57+09:00 traffic.apache {"count":0,"bytes":0,"count_rate":0.0,"bytes_rate":0.0,"time":1337928057}
2012-05-25T15:41:57+09:00 traffic.apache {"count":0,"bytes":0,"count_rate":0.0,"bytes_rate":0.0,"time":1337928117}
2012-05-25T15:52:10+09:00 traffic.apache {"count":0,"bytes":0,"count_rate":0.0,"bytes_rate":0.0,"time":1337928730}
2012-05-25T15:53:10+09:00 traffic.apache {"count":0,"bytes":0,"count_rate":0.0,"bytes_rate":0.0,"time":1337928790}
2012-05-25T16:40:28+09:00 traffic.apache {"count":10,"bytes":2762,"count_rate":0.16,"bytes_rate":46.03,"time":1337931628}
2012-05-25T16:41:28+09:00 traffic.apache {"count":0,"bytes":0,"count_rate":0.0,"bytes_rate":0.0,"time":1337931688}
2012-05-25T16:42:28+09:00 traffic.apache {"count":0,"bytes":0,"count_rate":0.0,"bytes
<source>
type tail
#format /^(?<XFF-host>[^ ]*) (?<host>[^ ]*) [^ ]* (?<user>[^ ]*) \[(?<time>[^\]]*)\] "(?<method>\S+)(?: +(?<path>[^ ]*) +\S*)?" (?<status>[^ ]*) (?<size>[^ ]*)(?: "(?<referer>[^\"]*)" "(?<agent>[^\"]*)" (?<response_time>[^ ]*))?$/
format /^(?<XFF-host>[^ ]*) (?<host>[^ ]*) [^ ]* (?<user>[^ ]*) \[(?<TIME>[^\]]*)\] "(?<method>\S+)(?: +(?<path>[^ ]*) +\S*)?" (?<status>[^ ]*) (?<size>[^ ]*)(?: "(?<referer>[^\"]*)" "(?<agent>[^\"]*)" (?<response_time>[^ ]*))?$/
time_format %d/%b/%Y:%H:%M:%S %z
#path /var/log/td-agent/tmp/access_log_sym
path /var/log/httpd/access_log
tag apache.access.localhost.127.0.0.1
pos_file /var/log/td-agent/tmp/access.log.pos
@oranie
oranie / gist:2786504
Created May 25, 2012 08:00
apacheログ
2012-05-25T15:25:46+09:00 apache.access.localhost.127.0.0.1 {"XFF-host":"-","host":"124.35.12.26","user":"-","method":"GET","path":"/js/bootstrap-modal.js","status":"200","size":"6424","referer":"http://219.94.251.203/view_graph/localserver/traffic.apache/traffic.apache_count","agent":"Mozilla/5.0 (Windows NT 6.1; WOW64; rv:12.0) Gecko/20100101 Firefox/12.0","response_time":"16720","time":1337927146}
2012-05-25T15:25:46+09:00 apache.access.localhost.127.0.0.1 {"XFF-host":"-","host":"124.35.12.26","user":"-","method":"GET","path":"/css/bootstrap.min.css","status":"200","size":"47375","referer":"http://219.94.251.203/view_graph/localserver/traffic.apache/traffic.apache_count","agent":"Mozilla/5.0 (Windows NT 6.1; WOW64; rv:12.0) Gecko/20100101 Firefox/12.0","response_time":"34540","time":1337927146}
2012-05-25T15:25:46+09:00 apache.access.localhost.127.0.0.1 {"XFF-host":"-","host":"124.35.12.26","user":"-","method":"GET","path":"/js/jquery-1.5.2.min.js","status":"200","size":
@oranie
oranie / gist:2787227
Created May 25, 2012 10:38
mongo_up_config
<source>
type tail
format /^(?<XFF-host>[^ ]*) (?<host>[^ ]*) [^ ]* (?<user>[^ ]*) \[(?<time>[^\]]*)\] "(?<method>\S+)(?: +(?<path>[^ ]*) +\S*)?" (?<status>[^ ]*) (?<size>[^ ]*)(?: "(?<referer>[^\"]*)" "(?<agent>[^\"]*)" (?<response_time>[^ ]*))?$/
#format /^(?<XFF-host>[^ ]*) (?<host>[^ ]*) [^ ]* (?<user>[^ ]*) \[(?<TIME>[^\]]*)\] "(?<method>\S+)(?: +(?<path>[^ ]*) +\S*)?" (?<status>[^ ]*) (?<size>[^ ]*)(?: "(?<referer>[^\"]*)" "(?<agent>[^\"]*)" (?<response_time>[^ ]*))?$/
time_format %d/%b/%Y:%H:%M:%S %z
#path /var/log/td-agent/tmp/access_log_sym
path /var/log/httpd/access_log
#tag apache.access.localhost.127.0.0.1
tag apache.access
@oranie
oranie / gist:2787230
Created May 25, 2012 10:38
mongo_under_config
<source>
type tail
format /^(?<XFF-host>[^ ]*) (?<host>[^ ]*) [^ ]* (?<user>[^ ]*) \[(?<time>[^\]]*)\] "(?<method>\S+)(?: +(?<path>[^ ]*) +\S*)?" (?<status>[^ ]*) (?<size>[^ ]*)(?: "(?<referer>[^\"]*)" "(?<agent>[^\"]*)" (?<response_time>[^ ]*))?$/
#format /^(?<XFF-host>[^ ]*) (?<host>[^ ]*) [^ ]* (?<user>[^ ]*) \[(?<TIME>[^\]]*)\] "(?<method>\S+)(?: +(?<path>[^ ]*) +\S*)?" (?<status>[^ ]*) (?<size>[^ ]*)(?: "(?<referer>[^\"]*)" "(?<agent>[^\"]*)" (?<response_time>[^ ]*))?$/
time_format %d/%b/%Y:%H:%M:%S %z
#path /var/log/td-agent/tmp/access_log_sym
path /var/log/httpd/access_log
#tag apache.access.localhost.127.0.0.1
tag apache.access
@oranie
oranie / gist:2822489
Created May 29, 2012 04:18
rpmbuild error
HEAD is now at 7621f66... v0.10.22
+ cd ..
+ rm -fR td-agent-1.1.6
+ mv fluentd td-agent-1.1.6
+ cp td-agent.conf td-agent-1.1.6
+ cp td-agent.prelink.conf td-agent-1.1.6
+ cp Makefile.am td-agent-1.1.6
+ cp autogen.sh td-agent-1.1.6
+ cp configure.in td-agent-1.1.6
+ tar czf td-agent-1.1.6.tar.gz td-agent-1.1.6