simplemonitor icon indicating copy to clipboard operation
simplemonitor copied to clipboard

repeated alerts when delay set

Open simeonfelis opened this issue 3 years ago • 5 comments

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.

simeonfelis avatar May 13 '22 17:05 simeonfelis

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.

jamesoff avatar May 24 '22 15:05 jamesoff

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?

simeonfelis avatar May 26 '22 09:05 simeonfelis

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.

jamesoff avatar May 26 '22 15:05 jamesoff

Hi! how is this issue going? just stumled across this bug too Thanks for simplemonitor, btw, its awesome for my use cases

kz159 avatar Dec 27 '22 18:12 kz159

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 :)

jamesoff avatar Dec 29 '22 15:12 jamesoff