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
# python hash_ring_selector2.py | |
DESTINATIONS : ['10.4.0.1:2104:a', '10.4.0.1:2204:b', | |
'10.4.0.2:2104:a', '10.4.0.2:2204:b'] | |
CARBONLINK_HOSTS: ['10.4.0.1:7102:a', '10.4.0.1:7202:b'] | |
result metric carbon-relay webapp | |
[ OK ] some.metric ('10.4.0.1', 'b') ('10.4.0.1', 'b') | |
[ OK ] mymetric ('10.4.0.1', 'a') ('10.4.0.1', 'a') |
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
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
def archive_to_bytes(archive): | |
def to_seconds(s): | |
SECONDS_IN_A = { | |
's': 1, | |
'm': 1 * 60, | |
'h': 1 * 60 * 60, |
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
* cloudtrail_template_1.json | |
dateのformatを YYYY-MM-dd'T'HH:mm:ssZ としたもの。 | |
* cloudtrail_template_2.json | |
dateのformatを date_time_no_millis としたもの。 | |
* mapping_after_insert.json | |
cloudtrail_template_1.json でデータ投入後のmapping (dynamic_templateが効いていない?のは要調査) | |
* data.json |
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
#!/usr/lib64/fluent/ruby/bin/ruby | |
require 'json' | |
require 'aws-sdk' | |
require 'msgpack' | |
require 'logger' | |
#log = Logger.new("/tmp/debug.log", 3) | |
#log.level = Logger::DEBUG |
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
<VirtualHost *:80> | |
ServerName es.yourhost.com | |
<Proxy balancer://main> | |
BalancerMember http://127.0.0.1:9200 max=1 retry=5 | |
<Limit GET > | |
order deny,allow | |
deny from all | |
allow from 127.0.0.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
<VirtualHost *:80> | |
ServerAdmin [email protected] | |
ServerName elasticsearch.domain.tld | |
ServerAlias kibana.domain.tld | |
DocumentRoot /path/to/kibana/docroot | |
<Directory /> | |
Options FollowSymLinks | |
AllowOverride None | |
</Directory> | |
<Directory /path/to/kibana/docroot> |
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
========================================== ========================================== | |
TMUX COMMAND WINDOW (TAB) | |
========================================== ========================================== | |
List tmux ls List ^b w | |
New -s <session> Create ^b c | |
Attach att -t <session> Rename ^b , <name> | |
Rename rename-session -t <old> <new> Last ^b l (lower-L) | |
Kill kill-session -t <session> Close ^b & |
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
import java.io.BufferedWriter; | |
import java.io.File; | |
import java.io.FileNotFoundException; | |
import java.io.IOException; | |
import java.io.OutputStream; | |
import java.io.OutputStreamWriter; | |
import java.io.PipedInputStream; | |
import java.io.PipedOutputStream; | |
import java.nio.ByteBuffer; | |
import java.nio.ByteOrder; |
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
import java.io.BufferedWriter; | |
import java.io.File; | |
import java.io.FileNotFoundException; | |
import java.io.IOException; | |
import java.io.OutputStream; | |
import java.io.OutputStreamWriter; | |
import java.io.PipedInputStream; | |
import java.io.PipedOutputStream; | |
import java.nio.ByteBuffer; | |
import java.nio.ByteOrder; |
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
import socket | |
import pickle | |
import random | |
import time | |
import struct | |
import threading | |
import urllib2 | |
#from sc_watchdog.logger import log |
NewerOlder