Giter Club home page Giter Club logo

endpoint-monitor's Introduction

Endpoint Monitor

Polls endpoints and posts their status on slack

This is a simple python script to monitor endpoints and post in slack based on their status codes.

Getting started

The following commands will download and run the project. However, you'll need to do the configuration down below first.

git clone https://github.com/KevinAiken/endpoint-monitor.git
cd endpoint-monitor
pip install -r requirements.txt
python main.py

Configuration

Slack Setup

First you'll need to create a Slack App: https://api.slack.com/apps?new_app=1

Add the 'incoming webhook' feature to your app: https://api.slack.com/messaging/webhooks

Make sure the sample curl command works successfully posts a message in your Slack.

Config.json

Now you'll need to configure the script by setting up the config.json file. An example is included in the repo.

Set slackWebhookUrl to your webhook url.

Add any endpoints you want to poll, expected statuses, and the slack message to send. To avoid sending a message on certain statuses, set the corresponding message to "".

Every endpoint needs an unknownResponse key and a connection failure key. The unknownResponse message will be sent if an endpoint returns a status code you did not specifically define in your json.

You can use a message prefix by setting the message prefix field. If you do not want to use the field, set it to "". An example is <!channel>, which will make all of the messages start with @channel.

Licensing

The code in this project is licensed under the GPL license.

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.