Fluentdは JSONストリームとしてログを扱うログ収集デーモンです。
これまでのところ、最大のユーザーではピーク時で
100台以上のサーバ、650GB daily 、70,000msgs/sec のログを収集しています。
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
# Send a metric to statsd from bash | |
# | |
# Useful for: | |
# deploy scripts (http://codeascraft.etsy.com/2010/12/08/track-every-release/) | |
# init scripts | |
# sending metrics via crontab one-liners | |
# sprinkling in existing bash scripts. | |
# | |
# netcat options: | |
# -w timeout If a connection and stdin are idle for more than timeout seconds, then the connection is silently closed. |
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 'sinatra' | |
require 'haml' | |
# 静的コンテンツ参照のためのパス設定 | |
set :public, File.dirname(__FILE__) + '/public' | |
# アップロード | |
get '/' do | |
haml :index |
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
tasks: | |
@echo Makefile for FooBar | |
@echo | |
@echo Usage: make [task] | |
@echo | |
@echo Tasks: | |
@ruby -ne 'puts " #{$$1.ljust(24)} => #{$$2}" if $$_ =~ /^([a-z\-]*):(?:.*)#\s*(.*)$$/' < Makefile | |
foo-task: # タスクの説明 | |
echo FOO TASK |
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
--- src/proto_http-orig.c 2011-09-10 22:43:11.000000000 +0100 | |
+++ src/proto_http.c 2012-03-07 00:06:10.000000000 +0000 | |
@@ -3560,8 +3560,10 @@ int http_process_request(struct session | |
(((struct sockaddr_in *)&s->req->prod->addr.c.from)->sin_addr.s_addr & s->be->except_mask.s_addr) | |
!= s->be->except_net.s_addr)) { | |
int len; | |
+ unsigned int port; | |
unsigned char *pn; | |
pn = (unsigned char *)&((struct sockaddr_in *)&s->req->prod->addr.c.from)->sin_addr; | |
+ port = ntohs(((struct sockaddr_in *)&s->req->prod->addr.c.from)->sin_port); |
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
# Adapted from http://pypi.python.org/pypi/watchdog | |
import sys, os, re | |
import time | |
import logging | |
from optparse import OptionParser | |
import subprocess | |
from watchdog.observers import Observer | |
import watchdog.events | |
import pythoncom |
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
{ | |
"template": "logstash-*", | |
"settings" : { | |
"number_of_shards" : 1, | |
"number_of_replicas" : 0, | |
"index" : { | |
"query" : { "default_field" : "@message" }, | |
"store" : { "compress" : { "stored" : true, "tv": true } } | |
} | |
}, |
ChefとかPuppetとかの勉強会です
次回があるかはわかりませんが、今回はChef成分多めになっております
Twitterハッシュタグ #pfcasual
IRCチャンネル #chef-casual@freenode
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
FC001: [廃止] nodeの属性にアクセスする際はシンボルではなく文字列を使う | |
FC002: 不必要な文字列展開を避ける | |
FC003: Chef Server固有の機能を使う前にChef Serverで稼働しているかを調べる | |
FC004: サービスの開始と終了にはserviceリソースを使う | |
FC005: リソース宣言の反復を避ける | |
FC006: ファイル権限のモードはクオートするか完全な記述する | |
FC007: レシピの依存関係をクックブックのメタデータで明確にする | |
FC008: 生成されたクックブックのメタデータを更新する | |
FC009: リソースの属性が未定義 | |
FC010: 検索の分布が不正 |
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 'zonefile' | |
require 'route53' | |
my_access_key = 'REPLACE_TO_YOUR_KEY' | |
my_secret_key = 'REPLACE_TO_YOUR_SECRET' | |
domain = 'example.com.' | |
zone_id = '/hostedzone/ZONEID' | |
default_ttl = '600' |
OlderNewer