项目作者: anaynayak

项目描述 :
Add Cloudwatch horizontal/vertical annotations e.g. deployment annotations
高级语言: JavaScript
项目地址: git://github.com/anaynayak/aws-cloudwatch-annotations.git
创建时间: 2018-07-26T15:56:38Z
项目社区:https://github.com/anaynayak/aws-cloudwatch-annotations

开源协议:

下载


Downloads Vulnerabilities" class="reference-link">aws-cloudwatch-annotations Build Downloads Vulnerabilities

Annotate Cloudwatch dashboards with horizontal/vertical annotations

Install

  1. $ npm install --global aws-cloudwatch-annotations

Usage

  1. $ aws-cloudwatch-annotations help
  2. Usage:
  3. aws-cloudwatch-annotations dashboard_name
  4. Options:
  5. --fill, -f Fill value for annotation (before/after/between)
  6. --color, -c Annotation color
  7. --widget-title, -w Update only widgets whose title matching specified regex
  8. --limit, -l Max number of annotations to maintain
  9. --title, -t Annotation title. Default: 'Deployment'
  10. --value, -v Annotation value. Default: Current time
  11. --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-cloudwatch-annotations 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).

  1. {
  2. "Version": "2012-10-17",
  3. "Statement": [
  4. {
  5. "Effect": "Allow",
  6. "Action": [
  7. "cloudwatch:PutDashboard",
  8. "cloudwatch:GetDashboard"
  9. ],
  10. "Resource": [
  11. "arn:aws:cloudwatch::123456789123:dashboard/annotations"
  12. ]
  13. }
  14. ]
  15. }

Examples

  1. # Vertical annotation between two timestamps
  2. aws-cloudwatch-annotations api-metrics --widget-title annotations --title 'Deployment #42' --value '2018-08-28T11:56:47Z' --upto '2018-08-29T11:59:47Z'
  3. # Vertical annotation at a single timestamp
  4. aws-cloudwatch-annotations api-metrics --widget-title annotations --title 'Enable feature toggle' --value '2018-08-28T11:56:47Z'