set setting reset

脂肪と糖にはたらくやつ

2015-04-01から1ヶ月間の記事一覧

ドメイン参加した Windows Server で chef-client が動かない

状況 ドメイン参加前に knife bootstrap でプロビジョニング済みの windows server を、 新規構築した Active Directory にドメイン参加させた後に chef-client がエラーになる。 $ bundle exec knife winrm -m ${ip_addr} -x ${user_name} "c:\opscode\chef…

terraform で既存のVPCを操作する

terraform の全能感いいですね。 terraform 0.4.2 で既存の VPC に対して下記のことを行ったのでメモです。 なお、インストールは brew install terraform で実施しました。 $ terraform usage: terraform [--version] [--help] <command> [<args>] Available commands are:</args></command>…

S3 フォルダ内の最新のファイル名を取得する

aws s3api list-objects --bucket ${BUCKET} --prefix ${PREFIX} \ --query 'sort_by(Contents[],&LastModified)|[-1]' --query オプションいいですね。

postgresql の過去の rpm

過去のバージョンの postgresql の rpm を探すことになったのですが、本家にはないので google したら mirror があったのでメモ。 Index of /mirror/CentOS-Third-Party/pgrpm/pgrpm-93/redhat

pgpool への connection を munin でグラフ化

bash で munin がんばるシリーズです。 pgrep で取得した情報からごにょごにょやっています。 Used な Connection が増えまくったことで新規コネクションが pgpool によって待たされることがないようにリソース監視しましょうというのが目的です。 グラフ化…

Reserved Instances が expire される前に通知する

そういう機能がある気もしますが、bash で書けたので晒してみます。 cron などで日次で動かすことを想定しています。 この内容だと、30/15/7日前に通知メールを送信するようになっています。 #!/bin/bash # Reserved Instance expire checker from_address="…

AWSCLI を使って ELB のトラフィックを munin でグラフ化

表題の通りの munin plugin です。 elb_traffic.sh #!/bin/bash AWS="/usr/bin/aws --region ap-northeast-1" ELB_NAME=`basename $0 | cut -d _ -f 1` # 取得したいメトリクス METRICS=("RequestCount" "HTTPCode_ELB_4XX" "HTTPCode_ELB_5XX" "HTTPCode_Ba…