npm.io
1.0.121 • Published 2 months agoCLI

reachable-watcher

Licence
CC-BY-3.0
Version
1.0.121
Deps
0
Size
15 kB
Vulns
0
Weekly
0
Stars
4

Project status

npm npm downloads

build push package

deploy web documentation documentation website

Use case

This module checks reachability of webservers. You can map a list of urls to their expected http status codes and a list of email addresses to inform if one of the url does not return the expected status code. A check interval is also configurable.

Features

  • Configurable interval to check for expected http status codes
  • Can be run on any linux machine (minimal dependencies)
  • Configure an email address to get notified if any resource doesn't work as expected or isn't even available.

Usage

Run this script to initialize the watcher.

./reachableWatcher.sh

or after installation:

reachable-watcher

Configuration

Simply edit the constants region of the provided shell script.

Installation (under systemd)

Copy the script file "reachableWatcher.sh" to "/usr/bin/reachable-watcher" and the provided service file ("reachableWatcher.service") to "/etc/systemd/system/reachable-watcher.service" run:

systemctl enable reachable-watcher

to enable the checking logic. After running:

systemctl start reachable-watcher

you can see the worker running in your system logs.

Keywords