Initial commit

This commit is contained in:
askiiart 2024-01-29 11:34:31 -06:00
commit 4cafe56c97
Signed by untrusted user who does not match committer: askiiart
GPG key ID: BC3800E55FB54D67
2 changed files with 21 additions and 0 deletions

18
checker_template.py Normal file
View file

@ -0,0 +1,18 @@
import random
class CheckerTemplate:
def __init__(arguments):
pass
def get_status():
latency = int(random.random() * 3000)
if latency > 2500: # "simulate" a timeout
return 0
elif latency > 1000: # "simulate" a very slow application - a partial outage
return 50
else:
return 100
def get_return_codes():
return {0: "Down", 50: "Partial outage", 100: "Up"}

3
readme.md Normal file
View file

@ -0,0 +1,3 @@
# Updog checker template
An example checker for [Updog](https://git.askiiart.net/askiiart/updog)