Ghaymah SRE exam submission - Mohamed Adel
هذا الالتزام موجود في:
10
q5-mithal-monitor/entrypoint.sh
Normal file
10
q5-mithal-monitor/entrypoint.sh
Normal file
@@ -0,0 +1,10 @@
|
||||
#!/usr/bin/env bash
|
||||
# Starts monitor.py in the background (checks mithal.space every 60s,
|
||||
# writes metrics.csv + metrics.json into /app), then serves the current
|
||||
# directory (including dashboard.html and metrics.json) over HTTP on 8080
|
||||
# so the dashboard can fetch('./metrics.json') directly.
|
||||
set -e
|
||||
|
||||
python3 monitor.py --url "${MONITOR_TARGET_URL:-https://mithal.space}" --interval 60 &
|
||||
|
||||
exec python3 -m http.server 8080
|
||||
المرجع في مشكلة جديدة
حظر مستخدم