Initial commit - basics of checker extensions added
This commit is contained in:
commit
609e4b50d5
4 changed files with 137 additions and 0 deletions
15
extensions/checkers/checker_template/checker_template.py
Normal file
15
extensions/checkers/checker_template/checker_template.py
Normal file
|
@ -0,0 +1,15 @@
|
|||
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
|
Loading…
Add table
Add a link
Reference in a new issue