diff options
author | David Sommerseth <davids@redhat.com> | 2015-09-25 21:40:18 +0200 |
---|---|---|
committer | David Sommerseth <davids@redhat.com> | 2015-09-25 21:40:18 +0200 |
commit | c4a83e9ef613ad136fefe207b4db97e3462c5639 (patch) | |
tree | 00e3cff33494c887cc15b88e695e95b7fe67e6b2 | |
parent | 3811f32cc5acb563de15eaaa07f9cfdd5016bca8 (diff) | |
download | logactio-c4a83e9ef613ad136fefe207b4db97e3462c5639.tar.gz logactio-c4a83e9ef613ad136fefe207b4db97e3462c5639.tar.xz logactio-c4a83e9ef613ad136fefe207b4db97e3462c5639.zip |
Fix off-by-one in hit counter
Without this patch the "count" variable would be off by one when
passing it to the reporter modules.
Signed-off-by: David Sommerseth <davids@redhat.com>
-rw-r--r-- | LogActio/__init__.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/LogActio/__init__.py b/LogActio/__init__.py index a7f0c54..95aa66a 100644 --- a/LogActio/__init__.py +++ b/LogActio/__init__.py @@ -130,7 +130,7 @@ class WatcherThread(threading.Thread): rep = alert.has_key("reporters") and alert["reporters"] or self.__reporters for r in rep: r.ProcessEvent(self.__logfile, alert["prefix"], info, - alert["threshold"].GetCurrentCount(regexmatch), alert["threshold"].GetThreshold()) + alert["threshold"].GetCurrentCount(regexmatch)+1, alert["threshold"].GetThreshold()) # If reset-rule-rate-limits is set, make a note to reset these # counters after all alerts have been processed |