• Stars
    star
    133
  • Rank 272,600 (Top 6 %)
  • Language
    JavaScript
  • License
    Apache License 2.0
  • Created about 8 years ago
  • Updated almost 2 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A lambda function to send alerts (to Slack, HipChat) on AWS maintenance events.

A lambda function to send alerts (to Slack, Hipchat) on AWS maintenance events. While the email from AWS includes only the instance id, the alert will include the Name of the instance and owner from the appropriate tags.

Sample Notification on Slack

Sample notification on HipChat

Prerequisite

The lambda function assumes that all resources (EC2 instances) are tagged with a key Owner specifying the owner of the resource.

Installation

Update lambda/config.json with necessary config for your environment. The keys are explained below:

store.simpledb.domain - The lambda function keeps track of processed events in AWS simbedb. This configures the simpledb domain to be used for this purpose.

notification.hipchat

  • auth_token - The Hipchat API token.
  • room - The room to send the notifications to.
  • icon_url - Icon to use for the bot that sends the notification.
  • username - Username of the bot that sends the notification.
  • owners - List of owners per tag. The keys here will be the value of the tag Owner. This maps the tag value to owners - for example - "devops : { "owner": "@devops_team"}"
    • all - this is a catchall owner that is used as default if the resource did not have the Owner tag.

notification.slack

  • hook - The slack hook url.
  • channel - The channel to send the notifications to.
  • icon_url - Icon to use for the bot that sends the notification.
  • username - Username of the bot that sends the notification.
  • owners - List of owners per tag. The keys here will be the value of the tag Owner. This maps the tag value to owners - for example - "devops : { "owner": "@devops_team"}"
    • all - this is a catchall owner that is used as default if the resource did not have the Owner tag.

Manual

Once the config.json has been updated, the lambda function can be manually installed by doing a npm install --production, zipping up the entire lambda folder and uploading to AWS like any other lambda function.

Terraform

The terraform plans to setup the lambda function are available at https://github.com/indix/terraform-aws-maintenance-lambda

It is also available as a module in the Terraform registry - https://registry.terraform.io/modules/indix/maintenance-lambda/aws

The plans include the necessary IAM roles and lambda schedule (once an hour by default). A normal terraform plan and terraform apply should fully setup the lambda function. Requires terraform 0.8.0+.

Example usage as a module:

module "aws-maintenance-lambda" {
  source =  "indix/maintenance-lambda/aws"

  lambda_prepared_source_dir = "${path.root}/aws-maintenance-lambda-temp/source"
  lambda_archive_path = "${path.root}/aws-maintenance-lambda-temp/dist/aws_maintenance_lambda.zip"
  config_json = "${path.root}/files/aws-maintenance-lambda-config.json"
}

License

This is an open source project licensed under the Apache License, Version 2.0.

More Repositories

1

whatthelang

Lightning Fast Language Prediction 🚀
Python
165
star
2

schemer

Schema registry for CSV, TSV, JSON, AVRO and Parquet schema. Supports schema inference and GraphQL API.
Scala
111
star
3

web-auto-extractor

Automatically extracts structured information from webpages
JavaScript
109
star
4

matsya

Place ASGs on the right Spot Market
Scala
39
star
5

gocd-s3-artifacts

Set of GoCD plugins to publish and fetch artifacts from Amazon S3
Java
36
star
6

formland

A simple, super-flexible, extensible config based form generator for React.
TypeScript
33
star
7

mlflow-gocd

GoCD plugins to work with MLFlow as model repository in a CD flow
Java
29
star
8

sparkplug

Spark package to "plug" holes in data using SQL based rules ⚡️ 🔌
Scala
28
star
9

css-optimum-selector

Helps to extract shortest optimal css-selector and multi-selector.
CSS
26
star
10

gocd-mesos

Autoscale GOCD agents on top of a mesos cluster
Scala
16
star
11

kafkajs-lz4

🗜 LZ4 compression codec for KafkaJS
TypeScript
15
star
12

javascript-easy-object

Now easily access or modify an object in javascript with javascript-easy-object.
JavaScript
13
star
13

vasuki

Scale GoCD Agents on demand with Docker
Go
13
star
14

rocks

RocksDB Ops CLI
Go
11
star
15

indix-radar

Indix Tech Radar
JavaScript
10
star
16

vamana

Autoscaling toolkit based on custom Application Metrics
Scala
9
star
17

terraform-aws-maintenance-lambda

Terraform module to deploy aws-maintenance-lambda - A lambda function to send alerts (to Slack, HipChat) on AWS maintenance events.
HCL
7
star
18

indix.github.io

Indix Open Source website
HTML
6
star
19

utils

Scala utils for anything and everything
Scala
5
star
20

indix-api-java

Indix API Java client
Java
4
star
21

indix-api-nodejs

Indix API NodeJS Client
JavaScript
4
star
22

bubblewrap

Asynchronous crawler utils
HTML
3
star
23

ml2npy

Export spark ml SparseVectors as numpy csr matrix
Scala
3
star
24

marathon-logger

Push marathon app logs to local syslog daemon
Go
2
star
25

indix-api-ruby

Ruby client for indix API
Ruby
2
star
26

crawler4j

crawler4j fork from Google code
Java
2
star
27

the-vision

Reusable react components
HTML
2
star
28

auto-tag-s3-bucket

Automatically tag S3 buckets with tags from a Google Spreadsheet
Python
2
star
29

openvpn-ops

This repo can be used to create a openvpn server.
Shell
1
star
30

abelwatch

Alerting tool on top of Abel
Go
1
star
31

hadoop-as-publisher

Hadoop Autoscaling Metric Publisher
Python
1
star
32

ansible-ruby

Ansible role to install rvm and ruby
1
star
33

ansible-telegraf

Ansible role to install telegraf
1
star
34

mod_evasive

git mirror of mod_evasive apache module from http://www.zdziarski.com/blog/wp-content/uploads/2010/02/mod_evasive_1.10.1.tar.gz
C
1
star
35

abel

Business stats collection/aggregation
Scala
1
star
36

ansible-monit

Ansible role for monit
1
star
37

rocksdb-io

hadoop formats, cascading tap and scalding sources for RocksDB
Scala
1
star
38

Mobile-Product-Search

This app is a representation of how Indix API can be used to leverage information on stores, brands, products which forms the skeleton of Retail Industry.
Objective-C
1
star