diff --git a/processor/processor.go b/processor/processor.go index b2c1d42..d08582b 100644 --- a/processor/processor.go +++ b/processor/processor.go @@ -139,8 +139,8 @@ func (p *processor) StartMonitoring() { ) /* - CREATE CONTINUOUS QUERY "processor_tempeture_5s" ON "core" BEGIN SELECT mean("tempeture") AS "mean_tempeture" INTO "12 weeks"."processor_tempeture_5s" FROM "processor_tempeture" GROUP BY processor, time(5s) fill(previous) END - */ + SELECT mean("tempeture") as tempeture FROM "processor_tempeture" WHERE $timeFilter GROUP BY "processor", time(5s) fill(previous) + */ highestTemp = p.getMaxTempetureOnProcessor(tempeturePathGlob) if highestTemp != p.tempeture { if p.tempetureChanged != nil { @@ -158,7 +158,7 @@ func (p *processor) StartMonitoring() { } /* - CREATE CONTINUOUS QUERY "processor_cooling_fanspeed_5s" ON "core" BEGIN SELECT mean("noob") AS "mean_noob" INTO "12 weeks"."processor_cooling_fanspeed_5s" FROM "processor_cooling_fanspeed" GROUP BY processor, time(5s) fill(previous) END + SELECT mean("noob") as noob FROM "processor_cooling_fanspeed" WHERE $timeFilter GROUP BY "processor", time(5s) fill(previous) CREATE CONTINUOUS QUERY "processor_cooling_fanspeed_5s" ON "core" BEGIN SELECT max("noob") AS "mean_noob" INTO "processor_cooling_fanspeed_5s" FROM "processor_cooling_fanspeed" GROUP BY "processor", time(5s) fill(previous) END */ fanspeed = p.normalizeFanspeed(p.fanController.Update(highestTemp)) if fanspeed != p.fanSpeed {