Code Monkey home page Code Monkey logo

ecoindex-api-check-mattermost's Introduction

Go Ecoindex Health checker

The aim of this project is to call the Health endpoint of an Ecoindex API, and send a Mattermost notification when there is an error on a dedicated incoming webhook.

You can configure this executable file to run as a scheduled task. The first time the API encounters an error, it will send a notification on Mattermost. When the server comes back to normal, it will send a notification of end of failure.

Prerequisite

It works on linux/386, linux/amd64, linux/arm64, windows/386, windows/amd64, darwin/amd64, darwin/arm64. You can download your platform package on the release page.

You obviously need a running Ecoindex API that you want to test and a Mattermost instance with a incoming webhook configured.

Execute

NAME:
   Ecoindex Bot - Check Ecoindex API Status and alert in case of emergency

USAGE:
   Ecoindex Bot [global options] command [command options] [arguments...]

COMMANDS:
   help, h  Shows a list of commands or help for one command

GLOBAL OPTIONS:
   --ecoindex_url value    base url of the ecoindex API to check (default: "http://localhost:8001")
   --mattermost_url value  mattermost webhook url used to send message
   --name value            name of the ecoindex API. It can bes something like 'production', 'backup' (default: "Local")
   --help, -h              show help (default: false)

Basic example

Run it on a localhost API instance:

./ecoindex_bot --name "My Local Ecoindex Instance" --mattermost_url "https://my.mattermost.com/hooks/myincomingwebhookid"

Run it on a remote API instance:

./ecoindex_bot --name "My Remote Ecoindex Instance" --mattermost_url "https://my.mattermost.com/hooks/myincomingwebhookid" --ecoindex_url "https://my.ecoindex.api"

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.