This file contains hidden or 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 json | |
import urllib | |
import boto3 | |
import os | |
import re | |
# constants | |
image_id = 'ami-a21529cc' # ubuntu-trusty-14.04-amd64-server-20160114.5 | |
subnet_id = 'subnet-example' | |
instance_profile_name = 'InstanceProfileName' |
This file contains hidden or 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/env python | |
# | |
# Usage: | |
# ./dump.py | |
# - It will stop after period specified seconds or after getting max size. | |
# - log is sent to s3 bucket. | |
# - notification | |
# > EC2 needed profile (s3 put) | |
# > You need edit INFRA s3 bucket policy. | |
# |
This file contains hidden or 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 re | |
import hashlib | |
class counterSlowQuery: | |
init_keep_info = { | |
'unix_time' : None, | |
'src_ip' : None, |
This file contains hidden or 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 python3 | |
import os | |
import json | |
import hashlib | |
import glob | |
# | |
# Config | |
# |
OlderNewer