cloudwatch-to-google-chat

module
v0.2.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 16, 2021 License: BSD-3-Clause

README

GitHub go.mod Go version GitHub GitHub release (latest SemVer) GitHub Workflow Status

Cloudwatch Alarms in Google Chat

This is an AWS Lambda function written in Go that receives alarms from AWS Cloudwatch and publishes them to a Google Chat chat room.

Service-In-AWS --> Cloudwatch Alarms --> SNS --> This-Lambda --> Google Chat

Deployment using AWS SAM

Deployment uses the AWS Serverless Application Model, with the template and config provided.

Prerequisites

You'll need:

  • go installed (version 1.16 or newer)
  • AWS SAM CLI installed
  • AWS CLI credentials set-up
Deploying to AWS

The deploy.sh script was tested on MacOS, and should work on Linux. You may need to adjust it if you are using Windows.

  1. Create an SNS Topic and configure your Cloudwatch Alarms to send notifications to it (if you have not already done so).
  2. Create a webhook in Google Chat.
  3. Execute ./aws-serverless/deploy.sh -g
  4. Enter parameter values when prompted:
  • ChatWebhookUrl The Google Chat webhook URL.
  • AlertImageUrl The URL of an image to show at the top of ALARM notification messages (optional; e.g. the exclamation triangle in the screenshot below).
  • OkImageUrl The URL of an image to show at the top of OK notification messages (optional; e.g. the tick-mark in the screenshot below)
  • SnsArn The ARN of the existing SNS Topic.
  • Use the default values for the other parameters.

Screenshot

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL