No description
Find a file
2024-01-29 11:22:34 -06:00
extensions/checkers/checker_template Initial commit - basics of checker extensions added 2024-01-29 10:45:39 -06:00
.gitignore Initial commit - basics of checker extensions added 2024-01-29 10:45:39 -06:00
LICENSE oi you got a loicense for that mate? 2024-01-29 11:22:34 -06:00
main.py Initial commit - basics of checker extensions added 2024-01-29 10:45:39 -06:00
readme.md Initial commit - basics of checker extensions added 2024-01-29 10:45:39 -06:00

askiiart/updog

What's updog?

Not much, you?

(it's a simple, extensible uptime monitor)

Warning

Extensions will be executed with no safety checks! Make sure an extension isn't malicious before adding it.

Uptime Checker Extensions

Updog doesn't do any monitoring by itself. Instead, extensions are used to check the status of whatever thing, and are used

Metadata

Extensions need to be put in the ./extensions/checkers folder and the name of the file must match the name of the folder. In the future, alerts and logging folders will be added for those extensions. For now, there is only support for checkers, and Updog itself will have very basic logging.

Methods

*: indicates a method is required

__init__()*

Arguments:

  • a list of strings from checker-args in services.json - for no arguments an empty list will be used

Return: None

get_status()*

Arguments: None

Return: An integer from 0 to 100 indicating status; defaults listed in get_return_codes()

These values can be overriden by providing get_return_codes()

get_return_codes()

Arguments: None

Return: A dict containing integers and their associated statuses.

Default:

{
    0: "Down",
    50: "Partial outage",
    100: "Up"
}

To-do

  • Add basic functionality
    • Read services.json file:
{
    "site" {
        "name": "A Website",
        "uptime-checker": "CheckerTemplate",
        "checker-args": {
            "url": "https://example.net",
            "port: "443",
        },
        "rate": 60,
        "alerts": "AlertsTemplate",
        "alerts-args" {
            "url": "https://example.com/webhook-url-or-whatever-goes-here"
        }
    }
}

The args are just passed to the extension as a dict, the extension handles it from there.

  • Add support for logging and alert extensions

All specs are still a work-in-progress, breaking changes are likely!