Module: check_mk
Branch: master
Commit: 95fbc4d11f426e950c99a362f08aa7dbda9452e0
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=95fbc4d11f426e…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Mon Mar 3 13:11:43 2014 +0100
Create a history entry for events that failed their target count
When a counting rule sees the first matching message, then an entry in the history
is logged with the type <tt>NEW</tt>. When the event did not reach the
configured
number of required message within the configured time then no history entry was
logged. Now an entry of type <tt>COUNTFAILED</tt> is being logged and you can
see
the count of messages received so far in that entry.
---
.werks/710 | 12 ++++++++++++
ChangeLog | 6 ++----
mkeventd/bin/mkeventd | 3 +++
3 files changed, 17 insertions(+), 4 deletions(-)
diff --git a/.werks/710 b/.werks/710
new file mode 100644
index 0000000..b7dd48c
--- /dev/null
+++ b/.werks/710
@@ -0,0 +1,12 @@
+Title: Create a history entry for events that failed their target count
+Level: 1
+Component: ec
+Version: 1.2.5i1
+Date: 1393848610
+Class: feature
+
+When a counting rule sees the first matching message, then an entry in the history
+is logged with the type <tt>NEW</tt>. When the event did not reach the
configured
+number of required message within the configured time then no history entry was
+logged. Now an entry of type <tt>COUNTFAILED</tt> is being logged and you can
see
+the count of messages received so far in that entry.
diff --git a/ChangeLog b/ChangeLog
index 58dcab2..07491e3 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -190,12 +190,9 @@
* 0719 FIX: postfix_mailq: fix Linux agent in case of ssmtp being installed
* 0584 FIX: agent_vsphere: special agent now handles non-standard https port
correctly...
* 0585 FIX: check_mk_agent.linux: more efficient handling of cups printer queues...
-<<<<<<< HEAD
- * 0587 FIX: if64: problems resolved when running as a clustered service...
-=======
* 0703 FIX: brocade_mlx: omit inventory of cpu and memory on more states...
* 0137 FIX: Fixed printer_pages...
->>>>>>> 9a0fafc30f54e0e7f2af9ac1fa7a41136d2019d1
+ * 0587 FIX: if64: problems resolved when running as a clustered service...
Multisite:
* 0371 Added log class filter to hostsvcevents view
@@ -323,6 +320,7 @@
Event Console:
* 0301 Handling messages of special syslog format correctly...
* 0388 Moved Event Console related settings to own settings page...
+ * 0710 Create a history entry for events that failed their target count...
* 0303 FIX: Old log entries were shown in event history first...
* 0304 FIX: Escaping several unwanted chars from incoming log messages...
* 0089 FIX: CSV export of event console was broken...
diff --git a/mkeventd/bin/mkeventd b/mkeventd/bin/mkeventd
index 5b87b74..b00f40f 100755
--- a/mkeventd/bin/mkeventd
+++ b/mkeventd/bin/mkeventd
@@ -1187,11 +1187,14 @@ class EventServer:
if event["count"] == 0:
log("Rule %s, event %d: again without allowed rate,
dropping event" %
(rule["id"], event["id"]))
+ log_event_history(event, "COUNTFAILED")
events_to_delete.append(nr)
+
else: # algorithm 'interval'
if event["first"] + count["period"] <=
now: # End of period reached
log("Rule %s: reached only %d out of %d events within %d
seconds. "
"Resetting to zero." % (rule["id"],
event["count"], count["count"], count["period"]))
+ log_event_history(event, "COUNTFAILED")
events_to_delete.append(nr)
# Handle delayed actions