Skip to content

Simple Node app to do health checks and send notifications to a slack channel

License

Notifications You must be signed in to change notification settings

profusion/health-check-slack

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

health-check-slack 🤖

Simple Node app to do health checks on 1 or more urls and send notifications to a slack channel

Install 🌟📦

git clone https://github.com/nclr/health-check-slack.git
cd health-check-slack
npm install

Usage ✨🚀

Simply edit config.json and add the urls to check along with the desired interval (in milliseconds) for each loop like the example below:

{
    "urls": {
        "rest service": {
            "url": "https://example.com/app/to/check",
            "interval": "20000"
        },
        "Website": {
            "url": "https://example.com",
            "interval": "3000"
        }
    }
}

Then set up an Incoming Webhook to one of your slack channels and you're good to go! 😉

Error Handling

When a 404 status code incurs it sends "LinkName is not reachable!" and when the error with the specified link is resolved (and a 200 status code is returned) it automatically responds with "LinkName is reachable again!". Every "fail" notification requires at least two failed attempts in a row to reach the desired URL. This minimizes the possibility of some temporary connection problem on the health-check server masqueraded as a URL problem.

About

Simple Node app to do health checks and send notifications to a slack channel

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%