Skip to content

Add Cloudwatch horizontal/vertical annotations e.g. deployment annotations

Notifications You must be signed in to change notification settings

tsmithv11/aws-cloudwatch-annotations-api

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

63 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

aws-cloudwatch-annotate-api

Based on aws-cloudwatch-annotations.

Annotate Cloudwatch dashboards with vertical annotations automatically by sending JSON to the API. Make sure to update "cloudwatch.js" with your region of your dashboard.

If you're running this 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"
            ]
        }
    ]
}

JSON format

Use the following format for your JSON:

{
    "dashboardName":"${dasboardName}",
    "type":"${verticalOrHorizontal}",
    "widgetTitle":"${titleOfWidgetToUpdate}",
    "time":"${timeOrValue}",
    "eventTitle":"${titleOfAnnotation}"
}

About

Add Cloudwatch horizontal/vertical annotations e.g. deployment annotations

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%