Lance Edgar
0ff20eb753
Add image fields for Appliance table
...
raw, normalized, thumbnail
2018-10-19 19:16:06 -05:00
Lance Edgar
6be6467f59
Add appliance table, and probe "location" in that context
2018-10-19 17:51:25 -05:00
Lance Edgar
871a9154da
Update some timeout field docstrings, per latest refactor
2018-10-19 16:47:20 -05:00
Lance Edgar
19553edda6
Add per-status timeouts and tracking for probe status
...
i.e. this lets us keep track of when a probe becomes "high temp" and then later
if it becomes "critical high temp" we can still know how long it's been high
2018-10-19 14:58:30 -05:00
Lance Edgar
8be64c0580
Update changelog
2018-10-17 19:31:37 -05:00
Lance Edgar
5830c7bd15
Fix logic bug when checking readings for client
...
yikes! first probe whose readings were checked okay, was causing other probes
to just be skipped
2018-10-17 19:26:48 -05:00
Lance Edgar
3aa4185de9
Leverage common "now" value when sending emails from server
...
i.e. don't generate new "now" when sending an email, just use the "now" we
established when starting to check the readings
2018-10-17 19:18:34 -05:00
Lance Edgar
71db57b2e0
Add probe URL to email template context
2018-10-17 18:08:54 -05:00
Lance Edgar
d6ab9a60f1
Update changelog
2018-10-09 16:36:07 -05:00
Lance Edgar
5bf69a0c21
Add "recent readings" to email template context
2018-10-08 00:52:16 -05:00
Lance Edgar
b4c52319c6
Make client more tolerant of database restart
...
note that a retry is *not* attempted within a given "take readings" run.
rather, client will consider that full readings take to have failed, if any
part of it fails.
but then we keep track of type/amount of some (database connection) failures,
and will suppress logging the full error for first 3 attempts. in practice
this lets us recover from simple database restarts, and if database becomes
truly unavailable we'll hear about it shortly.
any other type of error is immediately logged on first failure.
2018-10-07 18:47:02 -05:00
Lance Edgar
2f7fa3430a
Make server more tolerant of database restart
...
note that a retry is *not* attempted within a given "check readings" run.
rather, server will consider that full readings check to have failed, if any
part of it fails.
but then we keep track of type/amount of some (database connection) failures,
and will suppress logging the full error for first 3 attempts. in practice
this lets us recover from simple database restarts, and if database becomes
truly unavailable we'll hear about it shortly.
any other type of error is immediately logged on first failure.
2018-10-07 18:16:18 -05:00
Lance Edgar
b4fa6a17c5
Add "status since" to template context for email alerts
2018-10-06 20:17:46 -05:00
Lance Edgar
76e40063ee
Tweak server logic for checking client readings
...
do not check readings for "archived" clients. do not consider the client
"offline" unless it has *no* current probe readings. previously we were
assuming offline if any probe readings were missing, even if some were found.
2018-10-06 18:09:02 -05:00
Lance Edgar
440abf2b56
Improve docstrings for some model attributes
2018-10-06 17:39:54 -05:00
Lance Edgar
85e8ed9832
Log error when client probe takes a 185.0 reading
...
this indicates some power issue with the probe(s) and does not really mean
that's the temperature. so we don't want the server to send out "high temp"
email etc. but rather just a technical error email
https://www.controlbyweb.com/support/faq/temp-sensor-reading-error.html
2018-10-05 20:53:09 -05:00
Lance Edgar
74de10e74c
Log our supposed hostname on startup
...
just to help with troubleshooting
2018-10-05 19:30:01 -05:00
Lance Edgar
63aa29f7d7
Update changelog
2018-10-04 19:59:14 -05:00
Lance Edgar
18b224a3e0
Add Client.disk_type
to track SD card vs. USB
...
i.e. assuming raspberry pi device for the client. kind of a specific use case
behind this but it seemed like it could be useful generally
2018-09-28 19:14:55 -05:00
Lance Edgar
30a0f98e1d
Add notes field to client and probe tables
2018-09-28 12:26:49 -05:00
Lance Edgar
152ea26c02
Add Client.archived
flag, ignore archived for "disabled probes" check
...
this lets us keep old client config around without deleting it, but it should
not interfere with other logic etc.
2018-09-28 12:21:21 -05:00
Lance Edgar
018a9dcb08
Don't let server mark client as offline until readings fail 3 times in a row
...
previously we were only letting this fail once, if that
2018-09-28 11:57:27 -05:00
Lance Edgar
ab38143039
Include client key in disabled probe list email
2018-09-11 18:42:00 -05:00
Lance Edgar
aa98257448
Use invoke instead of fabric to release
2018-02-24 17:20:51 -06:00
Lance Edgar
b20c63d023
Update changelog
2018-02-07 17:53:11 -06:00
Lance Edgar
5df3379995
Send email alert when tempmon server marks a client as offline
...
courtesy of Cole Chaney <cole@mamajeansmarket.com>
2018-02-07 17:48:07 -06:00
Lance Edgar
8a1551e0f5
Send first alert "immediately" if critical temp status
...
i.e. only wait for "first email" delay if *not* critical
courtesy of Cole Chaney <cole@mamajeansmarket.com>
2018-02-07 17:47:48 -06:00
Lance Edgar
f8f29a8551
Update changelog
2017-11-19 17:46:46 -06:00
Lance Edgar
fd7cd5cadd
Add problem report for disabled clients/probes
2017-11-18 22:12:40 -06:00
Lance Edgar
840c146969
Update changelog
2017-08-08 18:47:29 -05:00
Lance Edgar
ef657d0842
Fix alembic script AGAIN
...
geez man
2017-08-08 18:46:53 -05:00
Lance Edgar
39a2da2b6b
Update changelog
2017-08-08 18:44:21 -05:00
Lance Edgar
32eb01fe09
Fix tempmon alembic script per continuum needs
...
is this really what we have to do now..?
2017-08-08 18:43:10 -05:00
Lance Edgar
5d81ac19a6
Grow the Reading.degrees_f
column
...
sometimes a probe will report a wacky temperature, but we should record
it even so
2017-08-05 12:54:08 -05:00
Lance Edgar
ad03e32f77
Don't kill tempmon client if DB session.commit() fails
...
let the daemon keep trying just like when device.read() fails
2017-08-05 12:49:04 -05:00
Lance Edgar
fa09c939f5
Update changelog
2017-08-04 16:08:44 -05:00
Lance Edgar
844a05202e
Add Client.readings
backref
2017-08-04 16:07:35 -05:00
Lance Edgar
aee6f6d341
Auto-delete child objects when deleting Client or Probe object
...
although if there are a lot of readings, this will still suck...
2017-08-04 15:14:48 -05:00
Lance Edgar
7c7dc56f8d
Update changelog
2017-07-07 09:24:48 -05:00
Lance Edgar
90e431c617
Switch license to GPL v3 (no longer Affero)
...
refs #2
2017-07-06 23:38:50 -05:00
Lance Edgar
6ff84b7f54
Update changelog
2017-07-06 21:33:42 -05:00
Lance Edgar
ea921cf58b
Replace occurrence of execfile()
2017-07-06 16:24:14 -05:00
Lance Edgar
2acc49be40
Tweak import placement to fix startup
...
i.e. per Continuum needs
2017-07-04 01:18:28 -05:00
Lance Edgar
9f21244ede
Add rattail purge-tempmon
command
...
for getting rid of all those old temperature readings, since
they're mostly just useful in real-time..
2017-07-03 18:10:52 -05:00
Lance Edgar
450f63434b
Update changelog
2017-06-01 17:38:57 -05:00
Lance Edgar
396b3739f3
Fix bug when marking client as offline from server loop
...
..i think?
2017-06-01 17:37:27 -05:00
Lance Edgar
5f680ff672
Update changelog
2017-06-01 17:18:30 -05:00
Lance Edgar
f04b4105c7
Tweak mail templates a bit, to reference config values
...
probably more needs to be done, this is at least a step..
2017-06-01 17:17:11 -05:00
Lance Edgar
c4b371cedd
Refactor main server loop a bit, to add basic retry w/ error logging
...
hopefully this lets us get past a simple Postgres restart..
2017-06-01 17:16:31 -05:00
Lance Edgar
27adc5ed70
Update changelog
2017-06-01 16:24:40 -05:00