Nettoyage des conflits dans Monitor.py et mise à jour du requirements.txt
This commit is contained in:
13
Monitor.py
13
Monitor.py
@@ -1,4 +1,3 @@
|
||||
# Surveillance continue avec envoi d'alertes par email + rappels + log CSV
|
||||
import mysql.connector
|
||||
from datetime import datetime, timedelta
|
||||
import time
|
||||
@@ -18,11 +17,9 @@ config = {
|
||||
"database": os.getenv("DB_NAME")
|
||||
}
|
||||
|
||||
<<<<<<< HEAD
|
||||
# Charger les destinataires depuis .env
|
||||
=======
|
||||
# Charger les destinataires depuis .env
|
||||
>>>>>>> product
|
||||
|
||||
destinataires = os.getenv("DESTINATAIRES_MAIL", "").split(',')
|
||||
|
||||
# --- Suivi des alertes actives pour rappels ---
|
||||
@@ -36,15 +33,14 @@ def envoyer_mail(sujet, message, destinataires_list):
|
||||
msg['To'] = ', '.join(destinataires_list)
|
||||
try:
|
||||
with smtplib.SMTP_SSL('smtp.mail.ovh.net', 465) as server:
|
||||
<<<<<<< HEAD
|
||||
|
||||
server.login('alertes_saclay@domo91.fr', 'Kdpke674y23Feq^H')
|
||||
server.sendmail(msg['From'], destinataires_list, msg.as_string())
|
||||
print(f"📧 Mail envoyé à {destinataires_list}", flush=True)
|
||||
=======
|
||||
server.login('alertes_saclay@domo91.fr','Kdpke674y23Feq^H')
|
||||
server.sendmail(msg['From'], destinataires, msg.as_string())
|
||||
print(f"📧 Mail envoyé à {destinataires}", flush=True)
|
||||
>>>>>>> product
|
||||
|
||||
except Exception as e:
|
||||
print(f"Erreur envoi mail : {e}", flush=True)
|
||||
|
||||
@@ -151,11 +147,8 @@ def surveiller():
|
||||
|
||||
if log_entries:
|
||||
df_logs = pd.DataFrame(log_entries)
|
||||
<<<<<<< HEAD
|
||||
df_logs.to_csv("/var/log/monitor.csv", sep=";", index=False)
|
||||
=======
|
||||
df_logs.to_csv("/home/debian/Gestion_sondes/Logs/monitor.csv", sep=";", index=False)
|
||||
>>>>>>> product
|
||||
|
||||
except Exception as e:
|
||||
print(f"Erreur : {e}", flush=True)
|
||||
|
||||
131
requirements.txt
131
requirements.txt
@@ -1,122 +1,9 @@
|
||||
<<<<<<< HEAD
|
||||
altair==5.5.0
|
||||
attrs==25.3.0
|
||||
blinker==1.9.0
|
||||
cachetools==5.5.2
|
||||
certifi==2025.4.26
|
||||
charset-normalizer==3.4.2
|
||||
click==8.1.8
|
||||
colorama==0.4.6
|
||||
contourpy==1.3.2
|
||||
cycler==0.12.1
|
||||
=======
|
||||
acme==2.1.0
|
||||
altair==5.5.0
|
||||
attrs==22.2.0
|
||||
blinker==1.5
|
||||
cachetools==5.5.2
|
||||
certifi==2022.9.24
|
||||
cffi==1.17.1
|
||||
chardet==5.1.0
|
||||
charset-normalizer==2.1.1
|
||||
click==8.1.8
|
||||
ConfigArgParse==1.5.3
|
||||
configobj==5.0.8
|
||||
contourpy==1.3.2
|
||||
cryptography==38.0.4
|
||||
cycler==0.12.1
|
||||
distro==1.8.0
|
||||
>>>>>>> product
|
||||
dotenv==0.9.9
|
||||
fonttools==4.57.0
|
||||
fpdf==1.7.2
|
||||
gitdb==4.0.12
|
||||
GitPython==3.1.44
|
||||
<<<<<<< HEAD
|
||||
idna==3.10
|
||||
Jinja2==3.1.6
|
||||
jsonschema==4.23.0
|
||||
jsonschema-specifications==2025.4.1
|
||||
kiwisolver==1.4.8
|
||||
logging==0.4.9.6
|
||||
MarkupSafe==3.0.2
|
||||
matplotlib==3.10.1
|
||||
mysql-connector-python==9.3.0
|
||||
narwhals==1.38.0
|
||||
numpy==2.2.5
|
||||
packaging==24.2
|
||||
paho-mqtt==2.1.0
|
||||
pandas==2.2.3
|
||||
pillow==11.2.1
|
||||
protobuf==6.30.2
|
||||
pyarrow==20.0.0
|
||||
pydeck==0.9.1
|
||||
pyparsing==3.2.3
|
||||
python-dateutil==2.9.0.post0
|
||||
python-dotenv==1.1.0
|
||||
pytz==2025.2
|
||||
referencing==0.36.2
|
||||
requests==2.32.3
|
||||
rpds-py==0.24.0
|
||||
schedule==1.2.2
|
||||
six==1.17.0
|
||||
smmap==5.0.2
|
||||
streamlit==1.45.0
|
||||
tenacity==9.1.2
|
||||
toml==0.10.2
|
||||
tornado==6.4.2
|
||||
typing_extensions==4.13.2
|
||||
tzdata==2025.2
|
||||
urllib3==2.4.0
|
||||
=======
|
||||
httplib2==0.20.4
|
||||
idna==3.3
|
||||
Jinja2==3.1.2
|
||||
josepy==1.13.0
|
||||
jsonpatch==1.32
|
||||
jsonpointer==2.3
|
||||
jsonschema==4.10.3
|
||||
kiwisolver==1.4.8
|
||||
markdown-it-py==2.1.0
|
||||
MarkupSafe==2.1.2
|
||||
matplotlib==3.10.1
|
||||
mdurl==0.1.2
|
||||
mysql-connector-python==9.3.0
|
||||
narwhals==1.33.0
|
||||
numpy==2.2.4
|
||||
oauthlib==3.2.2
|
||||
packaging==24.2
|
||||
paho-mqtt==2.1.0
|
||||
pandas==2.2.3
|
||||
parsedatetime==2.6
|
||||
pillow==11.1.0
|
||||
protobuf==5.29.4
|
||||
pyarrow==19.0.1
|
||||
pycparser==2.22
|
||||
pydeck==0.9.1
|
||||
Pygments==2.14.0
|
||||
PyJWT==2.6.0
|
||||
pyOpenSSL==23.2.0
|
||||
pyparsing==3.0.9
|
||||
pyRFC3339==1.1
|
||||
pyrsistent==0.18.1
|
||||
pyserial==3.5
|
||||
PySimpleSOAP==1.16.2
|
||||
python-dateutil==2.9.0.post0
|
||||
python-dotenv==1.1.0
|
||||
pytz==2022.7.1
|
||||
PyYAML==6.0
|
||||
requests==2.28.1
|
||||
rich==13.3.1
|
||||
six==1.16.0
|
||||
smmap==5.0.2
|
||||
streamlit==1.44.1
|
||||
supervisor==4.2.5
|
||||
tenacity==9.1.2
|
||||
toml==0.10.2
|
||||
tornado==6.4.2
|
||||
typing_extensions==4.13.1
|
||||
tzdata==2025.2
|
||||
urllib3==1.26.12
|
||||
>>>>>>> product
|
||||
watchdog==6.0.0
|
||||
mysql~=0.0.3
|
||||
mysql-connector-python~=9.2.0
|
||||
pandas~=2.2.3
|
||||
DateTime~=5.5
|
||||
streamlit~=1.44.1
|
||||
matplotlib~=3.10.1
|
||||
paho-mqtt~=2.1.0
|
||||
requests~=2.32.3
|
||||
schedule~=1.2.2
|
||||
Reference in New Issue
Block a user