View ZabbixClient.py
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
# | |
# Zabbix API Client. | |
# | |
# Usage: | |
# from modules.ZabbixClient import ZabbixClient | |
# ZABBIX_HOST = "zabbix.example.com" | |
# ZABBIX_PORT = 80 | |
# ZABBIX_USER = 'Admin' | |
# ZABBIX_PASS = 'zabbix' | |
# ZABBIX_PATH = '/api_jsonrpc.php' |
View openstack-retire-users-vm-list.sh
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/bash | |
# | |
# Keystoneから削除済みのユーザが所有者となっているVMのリストを表示します。 | |
# | |
# * jq コマンド必須です | |
# http://stedolan.github.io/jq/ | |
# # How to install | |
# wget -O /usr/bin/jq http://stedolan.github.io/jq/download/linux64/jq | |
# chmod +x /usr/bin/jq | |
# |
View openstack-vm-summary.sh
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/bash | |
# | |
# VMの利用状況を集計するスクリプトです。 | |
# | |
# - jq コマンド必須です | |
# http://stedolan.github.io/jq/ | |
# # How to install | |
# wget -O /usr/bin/jq http://stedolan.github.io/jq/download/linux64/jq | |
# chmod +x /usr/bin/jq | |
# |
View aws_vpn_between_vpcgw_and_debian_with_nat.sh
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/bash | |
# | |
# Setup VPN between Debian Linux and VPC G/W. | |
# How to use : ./this_script.sh Generic.txt | |
# | |
# For connecting IPsec VPN, you need to allow these connections. | |
# If VPN has global address, you change FORWARD to OUTPUT. | |
# | |
# ex) iptables -A FORWARD -p udp --dport 500 -j ACCEPT | |
# iptables -A FORWARD -p tcp --dport 500 -j ACCEPT |
View aws_vpn_between_vpcgw_and_debian_with_monit_for_non_nat.sh
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/bash | |
# | |
# Setup VPN between Debian Linux and VPC G/W. | |
# How to use : ./this_script.sh Generic.txt | |
# | |
# For connecting IPsec VPN, you need to allow these connections. | |
# If VPN has global address, you change FORWARD to OUTPUT. | |
# | |
# ex) iptables -A FORWARD -p udp --dport 500 -j ACCEPT | |
# iptables -A FORWARD -p tcp --dport 500 -j ACCEPT |
View yum_package_update.py
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 json | |
import urllib | |
import boto3 | |
import os | |
import re | |
# constants | |
image_id = 'ami-59bdb937' # Amazon Linux AMI 2015.09.2 x86_64 HVM GP2 | |
subnet_id = 'subnet-example' | |
instance_profile_name = 'InstanceProfileName' |
View apt_package_update.py
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 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' |
View CollectdClient.py
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
# | |
# For sending metric value to collectd server. | |
# | |
# Usage: | |
# from modules.CollectdClient import CollectdClient | |
# COLLECTD_HOST = "collectd.example.com" | |
# COLLECTD_PORT = 25826 | |
# client = CollectdClient(COLLECTD_HOST, COLLECTD_PORT) | |
# client.putval('example-web-01', 'service', 'gauge', 'metric', 300, 1.2345) | |
# |
View general_log_dump.py
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/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. | |
# |
View capacity-scheduler.xml
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
<?xml version="1.0"?> | |
<?xml-stylesheet type="text/xsl" href="configuration.xsl"?> | |
<configuration> | |
<!-- Setting up queues --> | |
<property> | |
<name>yarn.scheduler.capacity.root.queues</name> | |
<value>default,tree</value> |
OlderNewer