Skip to content

w00fmeow/py_health_checker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

py_health_checker

Non blocking CLI tool to monitor uptime of a web server

Usage

python3 -m py_health_checker --every="15 sec"

Arguments

-h, --help            show this help message and exit
-c CONFIG, --config CONFIG
                      Path to config file
-e EVERY, --every EVERY
                      Run health checks every x time. Example: --every="10 min"

Instalation

Run from the project directory

sudo python3 setup.py install

Config example

config file can be provided with ``--config`` option

{
        "channels": [
                {
                        "type": "telegram",
                        "bot_id": "382022228",
                        "token": "AAHZnewtR3-_IYSDQRCWBVfaeceVKZ_22222",
                        "chat_id": "328345576"
                }
        ],
        "targets": [
                {
                        "type": "http",
                        "name": "DuckduckGo",
                        "endpoint": "https://duckduckgo.com",
                        "method": "GET",
                        "checker": {
                                "status_code": 200
                        }
                }
        ]
}

Channels

Currently only telegram is supported. Support for other notification channels will be added in the near future

Targets

HTTP only for now. Support for other target types and checks will be added as well

Time units

Supported options are:

  1. sec
  2. min or mins
  3. hour or hours
  4. day or days
  5. week or weeks

Valid Examples:

  1. py_health_checker --every="1 week"
  2. py_health_checker --every="7 sec"
  3. py_health_checker -e="17 min"
  4. py_health_checker -e="1 day"

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages