aws-cloudwatch-annotations

1.2.2 • Public • Published

aws-cw-annotate Build Downloads Vulnerabilities

Annotate Cloudwatch dashboards with horizontal/vertical annotations

Install

$ npm install --global aws-cloudwatch-annotations

Usage

$ aws-cw-annotate help
Usage:
    aws-cw-annotate dashboard_name
Options:
    --fill, -f              Fill value for annotation (before/after/between)
    --color, -c             Annotation color
    --widget-title, -w      Update only widgets whose title matching specified regex
    --limit, -l             Max number of aws-cw-annotate annotations to maintain
    --title, -t             Annotation title. Default: 'Deployment'
    --value, -v             Annotation value. Default: Current time
    --horizontal, -h        Add horizontal annotation instead of vertical (default)

Initial setup for AWS credentials available via environment variables or via the shared credentials file is necessary. Please look at AWS credentials documentation for details.

If aws-cw-annotate is run on an EC2 instance add the following permissions to the instance role. Adapt it with the correct AWS account ID and dashboard name(s).

{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Effect": "Allow",
            "Action": [
                "cloudwatch:PutDashboard",
                "cloudwatch:GetDashboard"
            ],
            "Resource": [
                "arn:aws:cloudwatch::123456789123:dashboard/annotations"
            ]
        }
    ]
}

Examples

# Vertical annotation between two timestamps
aws-cw-annotate api-metrics --widget-title annotations --title 'Deployment #42' --value '2018-08-28T11:56:47Z' --upto '2018-08-29T11:59:47Z'

# Vertical annotation at a single timestamp
aws-cw-annotate api-metrics --widget-title annotations --title 'Enable feature toggle' --value '2018-08-28T11:56:47Z' 

Package Sidebar

Install

npm i aws-cloudwatch-annotations

Weekly Downloads

210

Version

1.2.2

License

MIT

Unpacked Size

18.6 kB

Total Files

9

Last publish

Collaborators

  • anaynayak