Open tobyaharris opened 2 months ago
Should also be resolved by #13
Above I'm getting at tag vs field, not string vs float. I've referenced https://github.com/DigitalShoestringSolutions/TemperatureMonitoring/commit/2061aac337ad638b156ce3eb4af778f28f1c0d31 = #13 = #15 which only change if we wrap the number in quotes in the MQTT payload. I'm opening a wider question about where and when the user should change the threshold, and what format it should be stored in.
The Threshold system needs reworking.
Although it is passed around as a float, it is stored in influx as a tag (rather than a field)
https://github.com/DigitalShoestringSolutions/TemperatureMonitoring/blob/99bfd7d57933f567e7b75f3fdbe2ad59262959d9/timeseries_sds/config/telegraf.conf#L64-L66
If the threshold value is to change during a deployment, we might want to track it (eg
feature/threshold-on-graph
or 2061aac337ad638b156ce3eb4af778f28f1c0d31 ). If so it might be counterproductive to have it as a Tag in influxdb. The dashboard would be easier to work if it were a field. Could the config file be polled every time the temperature is sampled? Currently editing it and running./stop.sh & ./start.sh
works but creates a significant gap in the data.Also on thresholds it would be nice to have a lower bound as well, so there becomes an acceptable range.
Or does this whole Threshold and AlertVal business need to get out of the datacollection module and live in an analysis service module or similar? I dream of seeing datacollection being nothing more than what is says on the tin.