Skip to content

Commit

Permalink
More info to check, add alerting
Browse files Browse the repository at this point in the history
  • Loading branch information
CoolCoderCarl committed Apr 23, 2024
1 parent ba33a5c commit 3b4f4fb
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions src/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,21 +82,15 @@ def http_requests(hosts: list):
logging.info(f"Going to request {h}")
sleep(1)
response = requests.get(f"http://{h}")
# response = requests.get(f"https://{h}", verify=False)
logging.info(response.status_code)
logging.info(response.text)
logging.info(response.request)
logging.info(response.headers)
logging.info(response.ok)
logging.info(response.raw)
logging.info(response.reason)
if response.status_code != 200:
telegram_sender.send_alert_to_telegram(h)
except requests.exceptions.SSLError as ssl_err:
telegram_sender.send_alert_to_telegram(f"{h} and {ssl_err}")
except requests.exceptions.BaseHTTPError as base_http_err:
# logging.error(f"BASE HTTP Error - {base_http_err}")
# SEND
telegram_sender.send_alert_to_telegram(f"{base_http_err}")


Expand Down

0 comments on commit 3b4f4fb

Please sign in to comment.