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 | |
import os | |
import requests | |
import boto3 | |
import base64 | |
import argparse | |
from getpass import getpass | |
from bs4 import BeautifulSoup as bs |
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
################################################## | |
### Elasticsearch host name | |
ES_HOST = "search-*******************.ap-northeast-1.es.amazonaws.com" | |
### Elasticsearch prefix for index name | |
INDEX_PREFIX = "slowquerylog" | |
### Elasticsearch type name is rds instance id | |
RDS_ID = "<RDS_INSTANCE_IDENTIFY>" |
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": "cloudfront-logs-*", | |
"mappings": { | |
"logs": { | |
"_source": { | |
"enabled": false | |
}, | |
"_all": { | |
"enabled": false | |
}, |
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 -*- | |
DOCUMENTATION = ''' | |
--- | |
module: swap | |
author: Shinji Fujimoto | |
short_description: Managed OS Swap space | |
requirements: None | |
description: |
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 argparse | |
import json | |
try: | |
import boto3 | |
import yaml | |
except ImportError: | |
print '*******************************' |
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 boto3 | |
def lambda_handler(event, context): | |
pipeline_name=event['PIPELINE_NAME'] | |
stage_name=event['STAGE_NAME'] | |
action_name=event['ACTION_NAME'] | |
cp = boto3.client('codepipeline') | |
state = cp.get_pipeline_state(name=pipeline_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
################################################## | |
### Elasticsearch host name | |
ES_HOST = "search-******************.ap-northeast-1.es.amazonaws.com" | |
### Elasticsearch prefix for index name | |
INDEX_PREFIX = "elb_log" | |
### ELB name for type name | |
ELB_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
##################################################################################### | |
### Select from low, middle, high. If you choice middle, script collect middle and high. | |
SEVERITY = "middle" | |
### Select from daily, weekly, monthly | |
INTERVAL = "daily" | |
### Specify Publish Topic Arn for SNS | |
TOPIC_ARN = "arn:aws:sns:*******:************:**********" |
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 boto3 | |
import os | |
import gzip | |
from datetime import datetime | |
from botocore.awsrequest import AWSRequest | |
from botocore.auth import SigV4Auth | |
from botocore.endpoint import BotocoreHTTPSession | |
from botocore.credentials import Credentials | |
def lambda_handler(event, context): |
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 | |
from boto.connection import AWSAuthConnection | |
import requests | |
import json | |
import sys | |
def main(): | |
host = sys.argv[1] |
OlderNewer