[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [doctor/master] Defaulting suppression time based on issue severity
commit eeae33fbbacf4de14d260ba24a1db0ae2e048538
Author: Damian Johnson <atagar@xxxxxxxxxxxxxx>
Date: Wed Aug 6 08:25:29 2014 -0700
Defaulting suppression time based on issue severity
Frequently I tone down our NOTICE issues to have a bit of suppression to cut
down on noise for the list. Just realized there's no reason not to make this a
blanket policy - defaulting suppression duration based on the runlevel, with it
being overwritten in our config.
---
consensus_health_checker.py | 9 ++++++++-
data/consensus_health.cfg | 12 ++----------
2 files changed, 10 insertions(+), 11 deletions(-)
diff --git a/consensus_health_checker.py b/consensus_health_checker.py
index e85ece1..2ce14a4 100755
--- a/consensus_health_checker.py
+++ b/consensus_health_checker.py
@@ -102,7 +102,14 @@ class Issue(object):
except ValueError:
log.error("Non-numic suppression time (%s): %s" % (self._template, suppression_duration))
- return 0
+ # Default to suppression based on the severity of the issue.
+
+ if self.get_runlevel() == Runlevel.NOTICE:
+ return 24 # 1 day
+ elif self.get_runlevel() == Runlevel.WARN:
+ return 4 # 4 hours
+ else:
+ return 0 # no suppression for errors
def __str__(self):
return "%s: %s" % (self.get_runlevel(), self.get_message())
diff --git a/data/consensus_health.cfg b/data/consensus_health.cfg
index 2201a57..ceb54ed 100644
--- a/data/consensus_health.cfg
+++ b/data/consensus_health.cfg
@@ -20,17 +20,9 @@ msg AUTHORITY_UNAVAILABLE => Unable to retrieve the {fetch_type} from {authority
# hours that we'll suppress messages if it hasn't changed
-suppression DIFFERENT_RECOMMENDED_VERSION => 24 # 1 day
-suppression UNKNOWN_CONSENSUS_PARAMETERS => 24 # 1 day
-suppression MISMATCH_CONSENSUS_PARAMETERS => 24 # 1 day
suppression CERTIFICATE_ABOUT_TO_EXPIRE => 336 # 2 weeks
-suppression MISSING_BANDWIDTH_SCANNERS => 24 # 1 day
-suppression EXTRA_BANDWIDTH_SCANNERS => 24 # 1 day
-suppression MISSING_AUTHORITIES => 168 # 1 week
-suppression EXTRA_AUTHORITIES => 168 # 1 week
-suppression TOR_OUT_OF_DATE => 168 # 1 week
-suppression BADEXIT_OUT_OF_SYNC => 24 # 1 day
-suppression BANDWIDTH_AUTHORITIES_OUT_OF_SYNC => 24 # 1 day
+suppression MISSING_AUTHORITIES => 24 # 1 day
+suppression TOR_OUT_OF_DATE => 24 # 1 day
suppression AUTHORITY_UNAVAILABLE => 24 # 1 day
# directory authorities for which to not provide notifications
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits