Reports AWS maintenance windows
Project description
AWS maintenance window reporter
Name
aws-maintenance-windows - reports upcoming maintenance actions and windows
Synopsis
aws-maintenance-windows [--send-metrics]
Options
--send-metrics - send the metrics to DataDog
Description
This utility counts the number of upcoming maintenance actions and active maintenance windows across EC2, RDS, Redshift and Opensearch. If --send-metrics is specified, the metrics are send to DataDog. This allows you to create alerts to notift you whenever a maintenance windows is pending.
The metrics send are:
-
aws.pending.maintenance.actions
number of available maintenance actions
-
aws.pending.maintenance.windows
number of scheduled maintenance windows
the metrics will be tagged with the aws service name and the following resource ids:
- domainid (opensearch)
- dbinstanceidentifier (rds)
- dbclusteridentifier (rds)
- instance-id (ec2)
- clusteridentifier (opensearch)
These tags are in accordance with the AWS tags defined by DataDog for the respective resources.
Examples
$ aws-maintenance-windows
INFO: Maintenance window of ec2 instance-id i-22222222222222222: The instance is running on degraded hardware on 2022-03-28 00:00:00+00:00
INFO: Maintenance window of rds dbclusteridentifier db: Upgrade to Aurora PostgreSQL 2.9.2 on 2022-03-16 04:00:00+00:00
INFO: Maintenance action available for opensearch domainid es: A newer release R20211203-P4 is available.
INFO: Maintenance windows of opensearch domainid es-2: An update to release R20211203-P5 has been requested and is pending. Before the update starts, you can cancel it any time on 2022-03-20 00:00:00+00:00
Environment
-
DD_API_KEY
Specifies the Datadog API key. if the value has the prefix ssm:// the api key will be retrieved by name the SSM Parameter Store eg (ssm://datadog-api-key)
-
DATADOG_TAGS
additional datadog tags to add to the metric in the form key:value,key2:value,...
Alternatives
The AWS Health services also provides insight into scheduled changes. The AWS Health API is only available for accounts with a support contract.
Install
To install the AWS maintenance window reporter, type:
pip install aws-maintenance-window-reporter
Deploy
To deploy the maintenance window reporter as an AWS Lambda, type:
git clone https://github.com/binxio/aws-maintenance-window-reporter.git
cd aws-maintenance-window-reporter
read -p 'DD API key >' DD_API_KEY
aws cloudformation deploy \
--capabilities CAPABILITY_IAM \
--stack-name aws-maintenance-window-reporter \
--template-file ./cloudformation/aws-maintenance-window-reporter.yaml \
--parameter-overrides "DataDogAPIKey=$DD_API_KEY"
This will install the maintenance window reporter in your AWS account and run every hour.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file aws-maintenance-window-reporter-0.2.8.tar.gz
.
File metadata
- Download URL: aws-maintenance-window-reporter-0.2.8.tar.gz
- Upload date:
- Size: 12.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.9 tqdm/4.63.0 importlib-metadata/4.11.3 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 04b0bcb8589408a794f1bb85fb8a1974eb4f08c0a029e28d539255f50c24ec9c |
|
MD5 | cdc88f9106eeec0a481d87072ba5fefe |
|
BLAKE2b-256 | 20fc37ab8e57caa8c3ac839ed51c16cfcbb430c452dd26a76f63b15e3182b56c |