Git Product home page Git Product logo

aws-cloudwatch-annotations's Introduction

aws-cloudwatch-annotations Build Downloads Vulnerabilities

Annotate Cloudwatch dashboards with horizontal/vertical annotations

Install

$ npm install --global aws-cloudwatch-annotations

Usage

$ aws-cloudwatch-annotations help
Usage:
    aws-cloudwatch-annotations 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 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-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).

{
    "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-cloudwatch-annotations 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-cloudwatch-annotations api-metrics --widget-title annotations --title 'Enable feature toggle' --value '2018-08-28T11:56:47Z' 

aws-cloudwatch-annotations's People

Contributors

anaynayak avatar dependabot-preview[bot] avatar dependabot-support avatar dependabot[bot] avatar quingkhaos avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

aws-cloudwatch-annotations's Issues

Import error

For the last couple of days we've been getting the below import error:

file:///Documents/node_modules/aws-cloudwatch-annotations/lib/cloudwatch.js:1
import { CloudWatchClient, GetDashboardCommand, PutDashboardCommand } from "@aws-sdk/client-cloudwatch";
         ^^^^^^^^^^^^^^^^
SyntaxError: Named export 'CloudWatchClient' not found. The requested module '@aws-sdk/client-cloudwatch' is a CommonJS module, which may not support all module.exports as named exports.
CommonJS modules can always be imported via the default export, for example using:

import pkg from '@aws-sdk/client-cloudwatch';
const { CloudWatchClient, GetDashboardCommand, PutDashboardCommand } = pkg;

    at ModuleJob._instantiate (node:internal/modules/esm/module_job:105:21)
    at async ModuleJob.run (node:internal/modules/esm/module_job:151:5)
    at async Loader.import (node:internal/modules/esm/loader:166:24)
    at async Object.loadESM (node:internal/process/esm_loader:68:5)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.