Module: check_mk
Branch: master
Commit: 7552daef9ed887a032d4b85110a96bcd116ed2a7
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=7552daef9ed887…
Author: Andreas Boesl <ab(a)mathias-kettner.de>
Date: Wed Jan 22 16:59:42 2014 +0100
FIX livestatus log table: fixed missing logentries of archived logfiles
In archived logfiles the line numbering of the logfile entries was incorrect.
The incorrect number could collide with the configuration option max_lines_per_logfile,
thus leading to an error where archive logfiles where not read completely.<br>
For example:<br>
More than 1000000 lines in ….. /live/var/archives/nagios-01-20-2014-00.log. Ignoring the
rest!
---
.werks/263 | 14 ++++++++++++++
ChangeLog | 3 +++
livestatus/src/Logfile.cc | 1 +
3 files changed, 18 insertions(+)
diff --git a/.werks/263 b/.werks/263
new file mode 100644
index 0000000..34daa4f
--- /dev/null
+++ b/.werks/263
@@ -0,0 +1,14 @@
+Title: livestatus log table: fixed missing logentries of archived logfiles
+Level: 1
+Component: liveproxy
+Class: fix
+State: unknown
+Version: 1.2.5i1
+Date: 1390406019
+
+In archived logfiles the line numbering of the logfile entries was incorrect.
+The incorrect number could collide with the configuration option max_lines_per_logfile,
+thus leading to an error where archive logfiles where not read completely.<br>
+For example:<br>
+More than 1000000 lines in ….. /live/var/archives/nagios-01-20-2014-00.log. Ignoring the
rest!
+
diff --git a/ChangeLog b/ChangeLog
index 6c5af24..4d496fd 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -235,6 +235,9 @@
* 0336 FIX: Limit the number of lines read from a single logfile...
* 0344 FIX: Fix semantics of columns num_services_hard_*...
+ Livestatus-Proxy:
+ * 0263 FIX: livestatus log table: fixed missing logentries of archived logfiles...
+
1.2.3i7:
Core & Setup:
diff --git a/livestatus/src/Logfile.cc b/livestatus/src/Logfile.cc
index 3324554..919c424 100644
--- a/livestatus/src/Logfile.cc
+++ b/livestatus/src/Logfile.cc
@@ -138,6 +138,7 @@ void Logfile::load(LogCache *logcache, time_t since, time_t until,
unsigned logc
return;
}
+ _lineno = 0;
loadRange(file, missing_types, logcache, since, until, logclasses);
fclose(file);
_logclasses_read |= missing_types;