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
[slack] | |
hook_url = https://hooks.slack.com/services/xxxxxxxxxx/yyyyyyyyyy/zzzzzzzzzzzzzzzzzzzzzzz | |
username = alert_bot | |
channel = #alert | |
icon_emoji = :guardsman: | |
token = TOKEN | |
[s3] | |
region = ap-northeast-1 | |
bucket_name = BUCKET_NAME |
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
[slack] | |
hook_url = https://hooks.slack.com/services/xxxxxxx/yyyyyyyy/zzzzzzzzzzzzzzzzzzzzzzzzzzzzzz | |
username = alert_bot | |
channel = #alert | |
icon_emoji = :guardsman: |
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
#!/bin/sh | |
# redis-notify.sh | |
MAIL_FROM="[email protected]" | |
MAIL_TO="[email protected]" | |
if [ "$#" = "2" ]; then | |
mail_subject="Redis Notification" | |
mail_body=`cat << EOB | |
============================================ |
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
daemonize yes | |
pidfile /var/run/redis-sentinel.pid | |
loglevel notice | |
logfile /var/log/redis-sentinel.log | |
port 26379 | |
sentinel monitor __MASTER_HOST__-cluster __MASTER_HOST__ 6379 1 | |
sentinel auth-pass __MASTER_HOST__-cluster [masterauth] | |
sentinel down-after-milliseconds __MASTER_HOST__-cluster 30000 | |
sentinel can-failover __MASTER_HOST__-cluster yes |
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
daemonize yes | |
pidfile /var/run/redis-sentinel.pid | |
loglevel notice | |
logfile /var/log/redis-sentinel.log | |
port 26379 |
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
daemonize yes | |
pidfile /var/run/redis.pid | |
port 6379 | |
timeout 0 | |
loglevel notice | |
logfile /var/log/redis.log | |
databases 16 | |
################################ SNAPSHOTTING ################################# | |
save 900 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
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
import sys | |
import boto.ec2 | |
from boto.ec2.connection import EC2Connection | |
from boto.vpc import VPCConnection | |
import logging | |
LOGFILE="/var/log/redis-ha.log" | |
# AWS CONFIGURATION |
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
#!/bin/sh | |
# redis-to-slave.sh | |
PROG_NAME=$0 | |
HOSTNAME=`hostname -s` | |
REDIS_PORT=6379 | |
logger -t ${PROG_NAME} "Start changing ${HOSTNAME} to redis slave..." | |
if [ "$#" != "1" ]; then |
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
#!/bin/sh | |
# redis-to-master.sh | |
PROG_NAME=$0 | |
HOSTNAME=`hostname -s` | |
logger -t ${PROG_NAME} "Start changing ${HOSTNAME} to redis master..." | |
logger -t ${PROG_NAME} "Change this host to master." | |
# up to master |
NewerOlder