Other toolsPython

Python – Simple Uptime Checker

Check endpoint availability with a small Python script.

Python
#!/usr/bin/env python3
import requests, sys, time
urls = sys.argv[1:]
while True:
    for u in urls:
        try:
            r = requests.get(u, timeout=5)
            print(u, r.status_code)
        except Exception as e:
            print(u, 'ERR', e)
    time.sleep(60)
  

From Joseph Nakhle's automation workbench.

More Other tools scripts