46 lines
1.8 KiB
Python
46 lines
1.8 KiB
Python
import urllib.request
|
|
import ssl
|
|
import sys
|
|
|
|
ctx = ssl.create_default_context()
|
|
ctx.check_hostname = False
|
|
ctx.verify_mode = ssl.CERT_NONE
|
|
|
|
endpoints = [
|
|
("Rancher Console", "https://aerodrome.snarfnet.net"),
|
|
("Argo CD Web UI", "https://argo.snarfnet.net"),
|
|
("Portainer Server", "https://140.44.4.71:9443"),
|
|
("Authentik SSO Portal", "https://authentik.snarfnet.net"),
|
|
("AWX Controller", "https://awx.snarfnet.net"),
|
|
("Grafana Dashboards", "https://grafana.snarfnet.net"),
|
|
("Homepage Dashboard", "https://homepage.snarfnet.net"),
|
|
("Uptime Kuma Monitor", "https://uptime.snarfnet.net/dashboard"),
|
|
("Jenkins Controller", "https://jenkins.snarfnet.net/login"),
|
|
("Coder Workspace", "https://coder.snarfnet.net"),
|
|
("Gitea GitOps Service", "http://140.44.4.51:90"),
|
|
("Zabbix Web Console", "http://140.44.4.51:8888"),
|
|
("Heimdall Portal", "http://140.44.4.71:85"),
|
|
("Peanut Dashboard", "http://140.44.4.71:8050"),
|
|
("Homebox Inventory", "http://140.44.4.71:3100"),
|
|
("Semaphore UI", "https://semaphore.snarfnet.net"),
|
|
("NPM Proxy Admin", "http://140.44.4.71:81")
|
|
]
|
|
|
|
print(f"{'SERVICE':<25} {'URL':<40} {'STATUS':<15}")
|
|
print("=" * 80)
|
|
|
|
for name, url in endpoints:
|
|
try:
|
|
req = urllib.request.Request(url, headers={'User-Agent': 'Mozilla/5.0'})
|
|
with urllib.request.urlopen(req, timeout=8, context=ctx) as resp:
|
|
code = resp.getcode()
|
|
print(f"{name:<25} {url:<40} {code} OK")
|
|
except urllib.error.HTTPError as e:
|
|
# Some endpoints return 401 or 403 on root if auth required
|
|
if e.code in [200, 301, 302, 307, 401, 403]:
|
|
print(f"{name:<25} {url:<40} {e.code} Responding")
|
|
else:
|
|
print(f"{name:<25} {url:<40} {e.code} HTTP Error")
|
|
except Exception as e:
|
|
print(f"{name:<25} {url:<40} ERR: {e}")
|