Skip to content

ntrv/check-aws-ec2-mainte

Repository files navigation

check-aws-ec2-mainte

Mackerel plugin to detect EC2 Retirement

GoDoc CI GitHub release Maintainability Test Coverage Go Report Card Renovate Go1.13 GitHub

Install

mkr

mkr plugin install ntrv/check-aws-ec2-mainte

HomeBrew

brew install https://raw.githubusercontent.com/ntrv/check-aws-ec2-mainte/master/Formula/check-aws-ec2-mainte.rb

Usage

$ TZ=Asia/Tokyo AWS_PROFILE=foo AWS_REGION=ap-northeast-1 ./check-aws-ec2-mainte --all
EC2 Mainte WARNING: Code: system-reboot, InstanceId: i-1234abcd, Date: 2019-03-29T21:00:00+09:00 - 2019-03-29T23:00:00+09:00, Description: scheduled reboot

Example of mackerel-agent.conf

[plugin.check.ec2mainte]
command = ["/path/to/check-aws-ec2-mainte", "-c", "48h"]
env = { AWS_REGION = "ap-northeast-1", TZ = "US/Pacific" }
max_check_attempts = 3
timeout_seconds = 15

ToDo

  • Detect Spot Instance Interruptions