mirror of
https://github.com/healthchecks/healthchecks.git
synced 2024-11-23 16:07:39 +00:00
9 lines
217 B
Plaintext
9 lines
217 B
Plaintext
# Using Python 3 standard library:
|
|
import socket
|
|
import urllib.request
|
|
|
|
try:
|
|
urllib.request.urlopen("PING_URL", timeout=10)
|
|
except socket.error as e:
|
|
# Log ping failure here...
|
|
print("Ping failed: %s" % e) |