Skip to content

Commit

Permalink
message
Browse files Browse the repository at this point in the history
  • Loading branch information
Feinburger committed May 3, 2024
1 parent d5522fe commit de53759
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ def monitor(subdomain, FQDN, record_list, uptime, downtime, recorded, zone_id):
response = requests.get(f"http://{FQDN}:{record_list[i].get('port', 80)}{record_list[i].get('path', '/')}", timeout=get_timeout)
status_code_range = record_list[i].get("status_code_range", [[200, 299]])
if not within_range(status_code_range, int(response.status_code)) or not string_match(record_list[i].get("match_string", "random_string"), response.text):
print(f"{record_list[i]["ip_address"]} not within range or string doens't match")
raise requests.RequestException()

print(f"{record_list[i]['ip_address']}:{record_list[i].get('port', 80)}{record_list[i].get('path', '/')} UP")
Expand Down

0 comments on commit de53759

Please sign in to comment.