github-ci-monitor

module
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Feb 5, 2021 License: MIT

README

github-ci-monitor

Build Status Go Report Card GitHub last commit License

Check GitHub repositories CI statues and send them to DataDog.

Overview

When we merge pull requests, sometimes CI/CD fails. Then we want to find the failure.

By running this tool periodically, we can monitor the status by DataDog.

This tool gets GitHub repositories CI statues (commit status and Check API) and sends the result by DataDog API.

Running on AWS Lambda

Architecture

architecture.png

  1. Run a Lambda Function periodically with Amazon CloudWatch Events.
  2. In a Lambda Function, get repositories statuses by GitHub API
  3. Send service checks by DataDog API
  4. Configure DataDog Monitor and send alerts from DataDog to Slack
How to setup

We publish github-ci-monitor at AWS Serverless Application Repository.

Configuration
  • Lambda's environment variables
  • AWS Secrets Manager's secret
Lambda's environment variables
  • CONFIG: YAML
---
repos:
- owner: suzuki-shunsuke
  repo: test-github-action
  ref: master
  status: true
  check_run: true
  check_suite: true
  tags:
    codeowner: sre
region: ap-northeast-1
secret_id: github-ci-monitor
check_name: ci.ok
tags:
  sender: github-ci-monitor
AWS Secrets Manager's secret
  • datadog_api_key
  • github_token

How to create the DataDog Monitor

New Monitor > Custom Check

  • Select a check: ci.ok

LICENSE

MIT

Directories

Path Synopsis
cmd
pkg
cli

Jump to

Keyboard shortcuts

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