This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
e = Event.new | |
e.timestamp = Time.now.to_i | |
e.category = 'counter.blog' | |
e.key = ['net', 'kzk9', 'blog', 'tornado'] | |
e.value = 1 | |
p client.Post(e) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# Cookbook Name:: td-agent | |
# Recipe:: default | |
# | |
# Copyright 2011, YOUR_COMPANY_NAME | |
# | |
# All rights reserved - Do Not Redistribute | |
# | |
group 'td-agent' do |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Repositories | |
resolvers ++= Seq( | |
"td-logger Maven2 Repository" at "http://treasure-data.com/maven2/", | |
"fluent-logger Maven2 Repository" at "http://fluentd.org/maven2/" | |
) | |
// Dependencies | |
libraryDependencies ++= Seq( | |
"com.treasure_data" % "td-logger" % "0.1.0" | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Scribe input | |
<source> | |
type scribe | |
port 1463 | |
</source> | |
# match tag=debug.** and dump to console | |
<match debug.**> | |
type null | |
</match> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
array(7) { | |
["stream_type"]=> | |
string(14) "tcp_socket/ssl" | |
["mode"]=> | |
string(2) "r+" | |
["unread_bytes"]=> | |
int(0) | |
["seekable"]=> | |
bool(false) | |
["timed_out"]=> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# Example Input | |
# | |
# time=1335851771&a=b&c=d&d=e | |
# | |
# Example Conf: | |
# | |
# <source> | |
# type tail_kv | |
# path /path/to/the/file1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# Example Input | |
# | |
# 1335851771|a|b | |
# | |
# Example Conf: | |
# | |
# <source> | |
# type tail_char_delim | |
# path /path/to/the/file1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'td' | |
require 'td-client' | |
cln = TreasureData::Client.new(ENV['TREASURE_DATA_API_KEY']) | |
job = cln.query('testdb', 'SELECT COUNT(1) FROM www_access') | |
until job.finished? | |
sleep 2 | |
job.update_status! | |
end | |
if job.success? |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
gem "unicorn", "~> 4.3.1" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
web: bundle exec unicorn -c lib/unicorn/config.rb -p $PORT |