From 98eb01bcb57f53c348b945b654f6a6147084c8d2 Mon Sep 17 00:00:00 2001 From: Awin Huang Date: Wed, 5 Feb 2025 15:57:40 +0800 Subject: [PATCH] Fix error --- awinlib/hdd.py | 3 +-- dockerfiles/dataExporter/code/awinlib/hdd.py | 2 +- dockerfiles/dataExporter/code/prometheus_data_exporter.py | 2 +- prometheus_data_exporter.py | 2 +- 4 files changed, 4 insertions(+), 5 deletions(-) diff --git a/awinlib/hdd.py b/awinlib/hdd.py index f078ef7..3e11ff6 100644 --- a/awinlib/hdd.py +++ b/awinlib/hdd.py @@ -1,6 +1,6 @@ import os -from .utilities import log, runCmd +from .utilities import runCmd def findHddIdInNt(): @@ -37,7 +37,6 @@ def findHddTemp(hddDict): for hddName in sorted(hddDict.keys()): cmd = f"smartctl -A {hddName} | grep Temperature_Celsius" hddTempString = runCmd(cmd) - log.logI(f'hddTempString = {hddTempString}') hddTempList = hddTempString.split(" ") hddTempList = [item for item in hddTempList if item != ""] if len(hddTempList) > 9: diff --git a/dockerfiles/dataExporter/code/awinlib/hdd.py b/dockerfiles/dataExporter/code/awinlib/hdd.py index 3e11ff6..bbd1489 100644 --- a/dockerfiles/dataExporter/code/awinlib/hdd.py +++ b/dockerfiles/dataExporter/code/awinlib/hdd.py @@ -1,6 +1,6 @@ import os -from .utilities import runCmd +from .utilities import log, runCmd def findHddIdInNt(): diff --git a/dockerfiles/dataExporter/code/prometheus_data_exporter.py b/dockerfiles/dataExporter/code/prometheus_data_exporter.py index c9fd009..0ecca91 100644 --- a/dockerfiles/dataExporter/code/prometheus_data_exporter.py +++ b/dockerfiles/dataExporter/code/prometheus_data_exporter.py @@ -56,7 +56,7 @@ def main(configs): hddTempExporter = HddTempDataExporter() cpuFanTempExporter = CpuFanTempDataExporter() powerStripLivingroomExporter = KasaPowerStripDataExporter("livingroom", "192.168.1.203") - powerStripAtticExporter = KasaPowerStripDataExporter("attic", "192.168.1.203") + powerStripAtticExporter = KasaPowerStripDataExporter("attic", "192.168.1.202") t315Atticexporter = TapoT315DataExporter(secrect["ip"], secrect["username"], secrect["password"], "鐵皮屋-溫濕度感測器", "attic-sensors") gaugeDict = {} diff --git a/prometheus_data_exporter.py b/prometheus_data_exporter.py index c9fd009..0ecca91 100644 --- a/prometheus_data_exporter.py +++ b/prometheus_data_exporter.py @@ -56,7 +56,7 @@ def main(configs): hddTempExporter = HddTempDataExporter() cpuFanTempExporter = CpuFanTempDataExporter() powerStripLivingroomExporter = KasaPowerStripDataExporter("livingroom", "192.168.1.203") - powerStripAtticExporter = KasaPowerStripDataExporter("attic", "192.168.1.203") + powerStripAtticExporter = KasaPowerStripDataExporter("attic", "192.168.1.202") t315Atticexporter = TapoT315DataExporter(secrect["ip"], secrect["username"], secrect["password"], "鐵皮屋-溫濕度感測器", "attic-sensors") gaugeDict = {}