Skip to content

Instantly share code, notes, and snippets.

View ouychai's full-sized avatar

ouychai ouychai

View GitHub Profile
ouychai@ouychai-HP-Notebook:~$ sudo aws-graph draw -c config.yml -o output.png
/var/lib/gems/2.2.0/gems/aws-graph-0.0.5/lib/aws-graph.rb:231:in `load': uninitialized constant AwsGraph::CLI::AWS (NameError)
from /var/lib/gems/2.2.0/gems/aws-graph-0.0.5/lib/aws-graph.rb:17:in `draw'
from /var/lib/gems/2.2.0/gems/thor-0.19.4/lib/thor/command.rb:27:in `run'
from /var/lib/gems/2.2.0/gems/thor-0.19.4/lib/thor/invocation.rb:126:in `invoke_command'
from /var/lib/gems/2.2.0/gems/thor-0.19.4/lib/thor.rb:369:in `dispatch'
from /var/lib/gems/2.2.0/gems/thor-0.19.4/lib/thor/base.rb:444:in `start'
from /var/lib/gems/2.2.0/gems/aws-graph-0.0.5/bin/aws-graph:5:in `<top (required)>'
from /usr/local/bin/aws-graph:23:in `load'
from /usr/local/bin/aws-graph:23:in `<main>'
@ouychai
ouychai / gist:8a163a6eb3c3401573b5
Created July 22, 2015 09:12
Logstash config for reading access log file to show on kibana.
input {
file {
path => "/root/access.log"
start_position => beginning
}
}
filter {
if [path] =~ "access" {
mutate { replace => { "type" => "apache_access" } }
{:timestamp=>"2015-07-20T15:55:16.141000+0700", :message=>"Reading config file", :file=>"logstash/agent.rb", :level=>:debug, :line=>"301"}
{:timestamp=>"2015-07-20T15:55:16.408000+0700", :message=>"Compiled pipeline code:\n@inputs = []\n@filters = []\n@outputs = []\n@input_file_1 = plugin(\"input\", \"file\", LogStash::Util.hash_merge_many({ \"path\" => (\"/tmp/access_log\".force_encoding(\"UTF-8\")) }, { \"start_position\" => (\"beginning\".force_encoding(\"UTF-8\")) }))\n\n@inputs << @input_file_1\n@filter_mutate_2 = plugin(\"filter\", \"mutate\", LogStash::Util.hash_merge_many({ \"replace\" => {(\"type\".force_encoding(\"UTF-8\")) => (\"apache_access\".force_encoding(\"UTF-8\"))} }))\n\n@filters << @filter_mutate_2\n@filter_grok_3 = plugin(\"filter\", \"grok\", LogStash::Util.hash_merge_many({ \"match\" => {(\"message\".force_encoding(\"UTF-8\")) => (\"%{COMBINEDAPACHELOG}\".force_encoding(\"UTF-8\"))} }))\n\n@filters << @filter_grok_3\n@filter_date_4 = plugin(\"filter\", \"date\", LogStash::Util.hash_merg
@ouychai
ouychai / gist:a750381410b88f0fbf13
Created July 20, 2015 08:42
output of logstash
{:timestamp=>"2015-07-20T15:25:13.451000+0700", :message=>"Reading config file", :file=>"logstash/agent.rb", :level=>:debug, :line=>"301"}
{:timestamp=>"2015-07-20T15:25:13.577000+0700", :message=>"Compiled pipeline code:\n@inputs = []\n@filters = []\n@outputs = []\n@input_file_1 = plugin(\"input\", \"file\", LogStash::Util.hash_merge_many({ \"path\" => (\"/root/jb.log.2015-07-11\".force_encoding(\"UTF-8\")) }, { \"type\" => (\"syslog\".force_encoding(\"UTF-8\")) }))\n\n@inputs << @input_file_1\n@output_elasticsearch_2 = plugin(\"output\", \"elasticsearch\", LogStash::Util.hash_merge_many({ \"host\" => (\"localhost\".force_encoding(\"UTF-8\")) }))\n\n@outputs << @output_elasticsearch_2\n@output_stdout_3 = plugin(\"output\", \"stdout\", LogStash::Util.hash_merge_many({ \"codec\" => (\"rubydebug\".force_encoding(\"UTF-8\")) }))\n\n@outputs << @output_stdout_3\n @filter_func = lambda do |event, &block|\n extra_events = []\n @logger.debug? && @logger.debug(\"filter received\", :event => event.to_hash)\n