Module: check_mk
Branch: master
Commit: 30253474029ec1917e5d1104d7404a4cf32d6aa6
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=30253474029ec1…
Author: Andreas Boesl <ab(a)mathias-kettner.de>
Date: Tue Feb 11 14:13:30 2014 +0100
FIX TIMEPERIOD TRANSITION messages no longer cut at 64 bytes
Whenever the timeperiod name was specified very long not all information got
logged into the monitoring history during a timeperiod transition.<br>
For example:<br>
nagios-02-07-2014-00.log:[1391684695] TIMEPERIOD TRANSITION:
ab@mathias-kettner.de_demo_timeperiod@shd-online.d<br><br>
Some mandatory information was missing at the end of the line, thus causing
the livestatus statehist table to crash, while processing such an invalid entry.
---
.werks/282 | 15 +++++++++++++++
ChangeLog | 1 +
livestatus/src/TimeperiodsCache.cc | 2 +-
3 files changed, 17 insertions(+), 1 deletion(-)
diff --git a/.werks/282 b/.werks/282
new file mode 100644
index 0000000..3e7b280
--- /dev/null
+++ b/.werks/282
@@ -0,0 +1,15 @@
+Title: TIMEPERIOD TRANSITION messages no longer cut at 64 bytes
+Level: 1
+Component: core
+Class: fix
+State: unknown
+Version: 1.2.5i1
+Date: 1392123708
+
+Whenever the timeperiod name was specified very long not all information got
+logged into the monitoring history during a timeperiod transition.<br>
+For example:<br>
+nagios-02-07-2014-00.log:[1391684695] TIMEPERIOD TRANSITION:
ab@mathias-kettner.de_demo_timeperiod@shd-online.d<br><br>
+
+Some mandatory information was missing at the end of the line, thus causing
+the livestatus statehist table to crash, while processing such an invalid entry.
diff --git a/ChangeLog b/ChangeLog
index 91c8aec..2700dde 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -21,6 +21,7 @@
* 0696 FIX: Remove garbled output of cmk -v in state of CMC
* 0682 FIX: Allow overriding of active and custom checks by more specific rule...
* 0267 FIX: Fixed auth.serials permission problem in check_mk standalone
installation...
+ * 0282 FIX: TIMEPERIOD TRANSITION messages no longer cut at 64 bytes...
Checks & Agents:
* 0306 esx_vsphere_counters: added missing ramdisk levels sfcbtickets
diff --git a/livestatus/src/TimeperiodsCache.cc b/livestatus/src/TimeperiodsCache.cc
index 5a3a21f..e8679a7 100644
--- a/livestatus/src/TimeperiodsCache.cc
+++ b/livestatus/src/TimeperiodsCache.cc
@@ -148,7 +148,7 @@ bool TimeperiodsCache::inTimeperiod(timeperiod *tp)
void TimeperiodsCache::logTransition(char *name, int from, int to)
{
- char buffer[64];
+ char buffer[256];
snprintf(buffer, sizeof(buffer), "TIMEPERIOD TRANSITION: %s;%d;%d", name,
from, to);
write_to_all_logs(buffer, LOG_INFO);
}