Skip to content

Instantly share code, notes, and snippets.

doryokujin doryokujin

Block or report user

Report or block doryokujin

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
doryokujin / gist:1251708
Created Sep 29, 2011
View gist:1251708
module Fluent
class RedisOutput < Fluent::BufferedOutput
Fluent::Plugin.register_output('redis', self)
def initialize
require 'redis'
require 'msgpack'
doryokujin / gist:1257119
Created Oct 2, 2011
MongoOutput included event time #2
View gist:1257119
module Fluent
class MongoOutput < BufferedOutput
Fluent::Plugin.register_output('mongo', self)
def initialize
require 'mongo'
require 'msgpack'
doryokujin / gist:1258927
Created Oct 3, 2011
manage rvm and gem using fabric
View gist:1258927
# -*- coding: utf-8 -*-
# install:
# document:
import os
from fabric.api import *
from fabric.decorators import *
doryokujin / _fluent.exapmle.conf
Created Oct 4, 2011
NoSQLAggregatedOutput #fluent
View _fluent.exapmle.conf
# my host is host4
type redis_dumper
tag reduce_redis
host host1
port 6003
delay 10
time_suffix s
key key1,key2,key3
doryokujin / fluent.shuffle.conf
Created Oct 4, 2011
How to write format_stream?
View fluent.shuffle.conf
# shuffle record partitioned by reduce_key
<match shuffle**>
type shuffle
reduce_key type
type shuffle_tcp
host delta5
port 24225
View fluent.shuffle.conf
## Send massage for servers defined by <forward> tag.
## Each input record are shuffled by key and partition function.
## Multiple keys are o.k.(sep by ',') and partition function is very flexible.
## The shuffle idea is the same as basic MapReduce.
<match shuffle**>
type shuffle
key key1,key2
flush_interval 1s
type shuffle_tcp
doryokujin / gist:1273920
Created Oct 9, 2011
include time in fluent out_plugin
View gist:1273920
require 'time'
def format(tag, event)
record = event.record.dup
# if you use a timestamp
timestamp = event.time
record['timestamp'] = timestamp
# if you use a time
time_obj =
record['time'] = time_obj
View fluent.shuffle.conf
<match shuffle**>
type shuffle
key type
flush_interval 1
type shuffle_tcp
host delta4
port 24226
doryokujin / gist:1294636
Created Oct 18, 2011
How to send an javascript event to rails controller within onSelect() function?
View gist:1294636
// app/views/*/index.rb.html
<% content_for :js do %>
$(document).ready(function() {
var treeview;
var indexes = <%= ActiveSupport::JSON.encode(@indexes).html_safe %>;
function onSelect(e) {
//alert("Selected: " + indexes[treeview.text(e.node)] );
View fluent.conf
type tail
format /^(?<time>[^ ]* [^ ]*[ ]*[^ ]* [^ ]*) \[(?<type>[^\]]*)\] (?<verb>[^ ]*) (?<object>[^ ]*) (?<message>.*)$/
time_format %a %b %e %H:%M:%S
path /log/mongo/delta6/shard05/mongo.log,/log/mongo/delta6/shard11/mongo.log,/log/mongo/delta6/shard17/mongo.log,/log/mongo/delta6/shard23/mongo.log
tag mongo
<match mongo**>
type file
You can’t perform that action at this time.