simplemonitor
simplemonitor copied to clipboard
repeated alerts when delay set
when delay is set for an email alerter I receive mails every interval.
I checked every other configuration value regarding repeat, limit, vfc etc. but could not find a possible error in the configuration.
Reading alerter.py Alert.should_alert is beyond my understanding. I suggest rewriting the 5 level nested if-clauses. Changing something there will always cause regressions.
Yeah, I fell foul of this a while back too. I have a mostly-complete fix including improvements to that nest of ifs, I'll try to finish it up and get it merged.
I have also started reworking the should_alert() method. it's difficult not to break the API for Alerter implementations. I try to do something with logic tables, see a non-working draft in my branch: https://github.com/simeonfelis/simplemonitor/tree/rework_should_alert
What do you thiink? Should I wait for your changes?
That looks interesting; I'm travelling at the moment so let me see where I got up to once I get home, but I think your version looks like it would be worth pursuing.
Hi! how is this issue going? just stumled across this bug too Thanks for simplemonitor, btw, its awesome for my use cases
Afraid it's not gone very far due to work and other commitments during the remainder of last year, but I'll try to find time soon to look at it again.
Glad (apart from this) SimpleMonitor is working for you :)