Module: check_mk
Branch: master
Commit: e65352db8ef01a3350b8c2f5cd342650c626531c
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=e65352db8ef01a…
Author: Andreas Boesl <ab(a)mathias-kettner.de>
Date: Thu Jan 23 14:29:30 2014 +0100
psperf.bat: moved to deprecated folder
---
agents/windows/plugins/{ => deprecated}/psperf.bat | 0
checks/ps | 3 +++
2 files changed, 3 insertions(+)
diff --git a/agents/windows/plugins/psperf.bat b/agents/windows/plugins/deprecated/psperf.bat
similarity index 100%
rename from agents/windows/plugins/psperf.bat
rename to agents/windows/plugins/deprecated/psperf.bat
diff --git a/checks/ps b/checks/ps
index 6bea6eb..01bbe5b 100644
--- a/checks/ps
+++ b/checks/ps
@@ -37,6 +37,9 @@
# (user, virtual_size, resident_size, %cpu, processID, pagefile_usage, usermodetime, kernelmodetime, openHandles, threadCount) name
#(\\KLAPPRECHNER\ab,29284,2948,0,3124,904,400576,901296,35,1) NOTEPAD.EXE
+# The plugin "psperf.bat" is depracted. As of version 1.2.5 all of this information
+# is reported by the windows agent itself. However, we still support sections from psperf.bat
+# if the agent version is lower than 1.2.5.
# Windows agent now ships a plugin "psperf.bat" that adds a section from wmic
# to the output:
# <<<ps:sep(44)>>>
Module: check_mk
Branch: master
Commit: dc3cd6973868e8b1f0948ef3818bb5420a399bec
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=dc3cd6973868e8…
Author: Bastian Kuhn <bk(a)mathias-kettner.de>
Date: Thu Jan 23 13:18:30 2014 +0100
Added files from unitrends backup
---
.werks/125 | 4 +-
agents/plugins/unitrends_backup.php | 64 +++++++++++++++++++++++++++++
checkman/unitrends_backup | 17 ++++++++
checks/unitrends_backup | 76 +++++++++++++++++++++++++++++++++++
4 files changed, 159 insertions(+), 2 deletions(-)
diff --git a/.werks/125 b/.werks/125
index fffd5d6..4b74c0f 100644
--- a/.werks/125
+++ b/.werks/125
@@ -1,4 +1,4 @@
-Title: Unitrends Backup
+Title: unitrends_backup:Unitrends Backup
Level: 1
Component: checks
Version: 1.2.5i1
@@ -6,5 +6,5 @@ Date: 1390467872
Class: feature
Unitrends is a enterprise class backup solution.
-This check kann monitor the Backup schedules from unitrends.
+This check can monitor the Backup schedules from unitrends.
diff --git a/agents/plugins/unitrends_backup.php b/agents/plugins/unitrends_backup.php
new file mode 100755
index 0000000..72ff7ab
--- /dev/null
+++ b/agents/plugins/unitrends_backup.php
@@ -0,0 +1,64 @@
+#!/usr/bin/php
+<?php
+print "<<<unitrends_backup:sep(124)>>>\n";
+$conn = "port=5432 dbname=bpdb user=postgres";
+$db = pg_connect($conn);
+
+$query = "SELECT
+ schedule_id, a.type AS app_type
+ FROM
+ bp.schedules AS s
+ JOIN
+ bp.application_lookup AS a USING(app_id)
+ WHERE
+ enabled=true AND email_report=true
+ ORDER BY s.name";
+$res = pg_query($db, $query);
+
+$start = time() - (24 * 3600);
+$in = array("start_time" => $start);
+bp_bypass_cookie(3, 'schedule_report');
+
+while ($obj = pg_fetch_object($res)) {
+ if ($obj->app_type == "Archive")
+ continue;
+
+ $in["schedule_id"] = (int)$obj->schedule_id;
+ $ret = bp_get_schedule_history($in);
+ if (empty($ret[0]["backups"]))
+ continue;
+
+ print "HEADER|".
+ $ret[0]["schedule_name"]."|" .
+ $ret[0]["application_name"]."|".
+ $ret[0]["schedule_description"]."|".
+ $ret[0]["failures"]."\n";
+
+ foreach($ret[0]["backups"] as $trash => $backup) {
+ foreach($backup as $row) {
+
+ $name = $row["primary_name"];
+ switch($ret[0]["app_type"]){
+ case "SQL Server":
+ $name .= "/".$row["secondary_name"];
+ break;
+
+ case "VMware":
+ $name .= ", VM ".$row["secondary_name"];
+ break;
+ }
+
+ $backup_type = $row["type"];
+
+ if (!isset($name))
+ $name = $backup_tyoe;
+
+ $backup_no = (isset($row["backup_id"])) ? $row["backup_id"] : "N/A" ;
+
+ print "$name|$backup_no|$backup_type|".$row['description']."\n";
+ }
+ }
+}
+pg_free_result($res);
+bp_destroy_cookie();
+?>
diff --git a/checkman/unitrends_backup b/checkman/unitrends_backup
new file mode 100644
index 0000000..d8787c7
--- /dev/null
+++ b/checkman/unitrends_backup
@@ -0,0 +1,17 @@
+title: Unitrends Backup Schedule
+agents: linux
+catalog: app/unitrends
+license: GPL
+distribution: check_mk
+description:
+ Unitrends is a enterprise class backup solution.
+ This plugin needs the unitrends_backup plugin installed on the unitrends server
+ in order to work. The plugin will deliver a complete list of all schedules including
+ a sublist of a jobs in this schdule from the last 24 hours.
+
+ As long all of the jobs are succsessful the check returns a {OK} state. In each other
+ case the check will return {CRITICAL}. In anycase it's possible to see the complete
+ log in the long plugin output field from the core.
+
+inventory:
+ One Service for each Schedule will be created
diff --git a/checks/unitrends_backup b/checks/unitrends_backup
new file mode 100644
index 0000000..1a61f53
--- /dev/null
+++ b/checks/unitrends_backup
@@ -0,0 +1,76 @@
+#!/usr/bin/python
+# -*- encoding: utf-8; py-indent-offset: 4 -*-
+# +------------------------------------------------------------------+
+# | ____ _ _ __ __ _ __ |
+# | / ___| |__ ___ ___| | __ | \/ | |/ / |
+# | | | | '_ \ / _ \/ __| |/ / | |\/| | ' / |
+# | | |___| | | | __/ (__| < | | | | . \ |
+# | \____|_| |_|\___|\___|_|\_\___|_| |_|_|\_\ |
+# | |
+# | Copyright Mathias Kettner 2013 mk(a)mathias-kettner.de |
+# +------------------------------------------------------------------+
+#
+# This file is part of Check_MK.
+# The official homepage is at http://mathias-kettner.de/check_mk.
+#
+# check_mk is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by
+# the Free Software Foundation in version 2. check_mk is distributed
+# in the hope that it will be useful, but WITHOUT ANY WARRANTY; with-
+# out even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE. See the GNU General Public License for more de-
+# ails. You should have received a copy of the GNU General Public
+# License along with GNU Make; see the file COPYING. If not, write
+# to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+# Boston, MA 02110-1301 USA.
+
+# Header: Schedule Name, Application Name, Schedule Description, Failures
+#<<<unitrends_backup:sep(124)>>>
+#HEADER|DMZ-SR01|Hyper-V 2012|DMZ-HV01|0
+#rodc2|18761|Incremental|Successful
+#rodc2|18761|Incremental|Successful
+#owncloud-test|18762|Incremental|Successful
+
+
+def inventory_unitrends_backup(info):
+ inventory = []
+ for line in info:
+ if line[0] == "HEADER":
+ inventory.append( (line[1], None) )
+ return inventory
+
+def check_unitrends_backup(item, _no_params, info):
+ found = False
+ details = []
+ for line in info:
+ if line[0] == "HEADER" and found:
+ # We are finish collection detail informatoinen
+ break
+
+ if found == True:
+ # Collection Backup deatils
+ app_type, bid, backup_type, status = line
+ details.append("Application Type: %s (%s), %s: %s" % \
+ ( app_type, bid, backup_type, status))
+ continue
+
+ if line[0] == "HEADER" and line[1] == item:
+ found = True
+ head, sched_name, app_name, sched_desc, failures = line
+ message = "%s Errors in last 24/h for Application %s (%s) " % \
+ ( failures, app_name, sched_desc )
+
+ if found == True:
+ message += "\n" + "\n".join(details)
+ if failures == '0':
+ return 0, message
+ else:
+ return 2, message
+ return 3, "Schedule not found in Agent Output"
+
+check_info["unitrends_backup"] = {
+ "check_function" : check_unitrends_backup,
+ "inventory_function" : inventory_unitrends_backup,
+ "service_description" : "Schedule %s",
+}
+
Module: check_mk
Branch: master
Commit: 6baefcc15a8baf66dc88340f93a1f16c7eef3745
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=6baefcc15a8baf…
Author: Bastian Kuhn <bk(a)mathias-kettner.de>
Date: Thu Jan 23 10:07:02 2014 +0100
Added missing files
---
agents/plugins/unitrends_backup.php | 144 +++++++++++++++++++++++++++++++++++
checkman/unitrends_backup | 17 +++++
checks/unitrends_backup | 76 ++++++++++++++++++
3 files changed, 237 insertions(+)
diff --git a/agents/plugins/unitrends_backup.php b/agents/plugins/unitrends_backup.php
new file mode 100755
index 0000000..47d7d45
--- /dev/null
+++ b/agents/plugins/unitrends_backup.php
@@ -0,0 +1,144 @@
+#!/usr/bin/php
+<?php
+print "<<<unitrends_backup:sep(124)>>>\n";
+$dbconn_string = "port=5432 dbname=bpdb user=postgres";
+$dbconn = pg_connect($dbconn_string);
+if($dbconn === FALSE) {
+ print "ERROR|Cannot connect to database.\n";
+ die(1);
+}
+
+$query = "SELECT schedule_id, a.type AS app_type ";
+$query .= "FROM bp.schedules AS s ";
+$query .= "JOIN bp.application_lookup AS a USING(app_id) ";
+$query .= "WHERE enabled=true AND email_report=true ";
+$query .= "ORDER BY s.name";
+$res = pg_query($dbconn, $query);
+if ($res === false) {
+ print "ERROR|Cannot read schedules table:\n";
+ print pg_last_error($dbconn)."\n";
+ die(1);
+}
+
+$nschedules = 0;
+$nfailed = 0;
+
+$now = time();
+$begin = $now - (24 * 3600);
+$begin = round($begin/3600) * 3600 ;
+$input = array("start_time" => $begin);
+bp_bypass_cookie(3, 'schedule_report');
+
+// Loop through the schedules and get event details from schedule_history
+while ($item = pg_fetch_assoc($res)) {
+ if ($item["app_type"] == "Archive") {
+ continue;
+ }
+ // Get the schedule history
+ $input["schedule_id"] = (int)$item["schedule_id"];
+ $ret = bp_get_schedule_history($input);
+ if ($ret === false) {
+ print "bp_get_schedule_history returned FALSE:\n";
+ print "Error is: ".bp_error()."\n";
+ die(1);
+ }
+ if (empty($ret[0]["backups"])) {
+ continue;
+ }
+
+ $nschedules++;
+ $nfailed += $ret[0]["failures"];
+ $sched = $ret[0];
+
+ // Construct the schedule information section.
+ $aus = "HEADER|".$sched["schedule_name"]."|" .$sched["application_name"]."|".$sched["schedule_description"]."|".$sched["failures"]."\n";
+ print $aus;
+
+ // The rows correspond to each backup.
+ foreach($sched["backups"] as $event => $bkups) {
+ foreach($bkups as $row) {
+ // Construct the row values for each backup.
+ // Add code here to handle new application-specific name types.
+ $name = $row["primary_name"];
+
+ if ($sched["app_type"] == "SQL Server") {
+ $name .= "/".$row["secondary_name"];
+ }
+ if ($sched["app_type"] == "VMware") {
+ $name .= ", VM ".$row["secondary_name"];
+ }
+
+ // Backup types - these are the strings defined by
+ // bp_get_backup_status
+ switch ($row["type"]) {
+ case "master":
+ $bkup_type = "Master";
+ break;
+ case "exchange full":
+ case "hyperv full":
+ case "mssql full":
+ case "vmware full":
+ case "oracle full":
+ case "sharepoint full":
+ $bkup_type = "Full";
+ break;
+ case "differential":
+ case "exchange differential":
+ case "hyperv differential":
+ case "mssql differential":
+ case "vmware differential":
+ case "sharepoint diff":
+ $bkup_type = "Differential";
+ break;
+ case "exchange incremental":
+ case "hyperv incremental":
+ case "vmware incremental":
+ case "oracle incr":
+ case "incremental":
+ $bkup_type = "Incremental";
+ break;
+ case "mssql transaction":
+ $bkup_type = "Transaction Log";
+ break;
+ case "selective":
+ $bkup_type = "Selective";
+ break;
+ case "baremetal":
+ $bkup_type = "BareMetal";
+ break;
+ default: //just in case
+ $bkup_type = "Unknown";
+ break;
+ }
+
+ if (!isset($name)) {
+ $name = $bkup_type;
+ }
+
+ // Set the Backup Id.
+ if (isset($row["backup_id"])) {
+ $bkup_no = $row["backup_id"];
+ }
+ else {
+ $bkup_no = "N/A";
+ }
+
+
+ $status = $row["description"];
+ $str .= $name."|";
+ $str .= $bkup_no."|";
+ $str .= $bkup_type."|";
+ $str .= $status."\n";
+
+ print $str;
+ }
+ }
+ unset($sched);
+}
+
+pg_free_result($res);
+
+bp_destroy_cookie();
+exit(0);
+
+?>
diff --git a/checkman/unitrends_backup b/checkman/unitrends_backup
new file mode 100644
index 0000000..d8787c7
--- /dev/null
+++ b/checkman/unitrends_backup
@@ -0,0 +1,17 @@
+title: Unitrends Backup Schedule
+agents: linux
+catalog: app/unitrends
+license: GPL
+distribution: check_mk
+description:
+ Unitrends is a enterprise class backup solution.
+ This plugin needs the unitrends_backup plugin installed on the unitrends server
+ in order to work. The plugin will deliver a complete list of all schedules including
+ a sublist of a jobs in this schdule from the last 24 hours.
+
+ As long all of the jobs are succsessful the check returns a {OK} state. In each other
+ case the check will return {CRITICAL}. In anycase it's possible to see the complete
+ log in the long plugin output field from the core.
+
+inventory:
+ One Service for each Schedule will be created
diff --git a/checks/unitrends_backup b/checks/unitrends_backup
new file mode 100644
index 0000000..1a61f53
--- /dev/null
+++ b/checks/unitrends_backup
@@ -0,0 +1,76 @@
+#!/usr/bin/python
+# -*- encoding: utf-8; py-indent-offset: 4 -*-
+# +------------------------------------------------------------------+
+# | ____ _ _ __ __ _ __ |
+# | / ___| |__ ___ ___| | __ | \/ | |/ / |
+# | | | | '_ \ / _ \/ __| |/ / | |\/| | ' / |
+# | | |___| | | | __/ (__| < | | | | . \ |
+# | \____|_| |_|\___|\___|_|\_\___|_| |_|_|\_\ |
+# | |
+# | Copyright Mathias Kettner 2013 mk(a)mathias-kettner.de |
+# +------------------------------------------------------------------+
+#
+# This file is part of Check_MK.
+# The official homepage is at http://mathias-kettner.de/check_mk.
+#
+# check_mk is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by
+# the Free Software Foundation in version 2. check_mk is distributed
+# in the hope that it will be useful, but WITHOUT ANY WARRANTY; with-
+# out even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE. See the GNU General Public License for more de-
+# ails. You should have received a copy of the GNU General Public
+# License along with GNU Make; see the file COPYING. If not, write
+# to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+# Boston, MA 02110-1301 USA.
+
+# Header: Schedule Name, Application Name, Schedule Description, Failures
+#<<<unitrends_backup:sep(124)>>>
+#HEADER|DMZ-SR01|Hyper-V 2012|DMZ-HV01|0
+#rodc2|18761|Incremental|Successful
+#rodc2|18761|Incremental|Successful
+#owncloud-test|18762|Incremental|Successful
+
+
+def inventory_unitrends_backup(info):
+ inventory = []
+ for line in info:
+ if line[0] == "HEADER":
+ inventory.append( (line[1], None) )
+ return inventory
+
+def check_unitrends_backup(item, _no_params, info):
+ found = False
+ details = []
+ for line in info:
+ if line[0] == "HEADER" and found:
+ # We are finish collection detail informatoinen
+ break
+
+ if found == True:
+ # Collection Backup deatils
+ app_type, bid, backup_type, status = line
+ details.append("Application Type: %s (%s), %s: %s" % \
+ ( app_type, bid, backup_type, status))
+ continue
+
+ if line[0] == "HEADER" and line[1] == item:
+ found = True
+ head, sched_name, app_name, sched_desc, failures = line
+ message = "%s Errors in last 24/h for Application %s (%s) " % \
+ ( failures, app_name, sched_desc )
+
+ if found == True:
+ message += "\n" + "\n".join(details)
+ if failures == '0':
+ return 0, message
+ else:
+ return 2, message
+ return 3, "Schedule not found in Agent Output"
+
+check_info["unitrends_backup"] = {
+ "check_function" : check_unitrends_backup,
+ "inventory_function" : inventory_unitrends_backup,
+ "service_description" : "Schedule %s",
+}
+
Module: check_mk
Branch: master
Commit: 030e4f428882ad174d1386b7abc8cc1b45888af1
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=030e4f428882ad…
Author: Bastian Kuhn <bk(a)mathias-kettner.de>
Date: Thu Jan 23 10:05:56 2014 +0100
Unitrends Backup
Unitrends is a enterprise class backup solution.
This check kann monitor the Backup schedules from unitrends.
---
.werks/125 | 10 ++++++++++
ChangeLog | 1 +
2 files changed, 11 insertions(+)
diff --git a/.werks/125 b/.werks/125
new file mode 100644
index 0000000..fffd5d6
--- /dev/null
+++ b/.werks/125
@@ -0,0 +1,10 @@
+Title: Unitrends Backup
+Level: 1
+Component: checks
+Version: 1.2.5i1
+Date: 1390467872
+Class: feature
+
+Unitrends is a enterprise class backup solution.
+This check kann monitor the Backup schedules from unitrends.
+
diff --git a/ChangeLog b/ChangeLog
index 25d3ce9..e5c4651 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -60,6 +60,7 @@
* 0463 emcvnx_raidgroups.capacity, emcvnx_raidgroups.capacity_contiguous: New Checks for EMC VNX Storage systems...
* 0570 fileinfo.groups: file groups now allow exclude patterns as well
* 0464 stulz_pump: new check for the status of pumps of Stulz clima units
+ * 0125 Unitrends Backup...
* 0103 FIX: services: Fixed bug with service inventory defined in main.mk...
* 0299 FIX: borcade_mlx_fan: Prettified output, handling "other" state now
* 0300 FIX: cisco_fru_power: Trying not to inventorize not plugged in FRUs...
Module: check_mk
Branch: master
Commit: 5269bd44069544ffa000574e638d0a3f71dbf302
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=5269bd44069544…
Author: Bernd Stroessenreuther <bs(a)mathias-kettner.de>
Date: Wed Jan 22 19:02:59 2014 +0100
stulz_pump: new check for the status of pumps of Stulz clima units
---
.werks/464 | 8 ++++++++
ChangeLog | 1 +
checkman/stulz_pump | 11 +++++++++++
checks/stulz_pump | 53 +++++++++++++++++++++++++++++++++++++++++++++++++++
4 files changed, 73 insertions(+)
diff --git a/.werks/464 b/.werks/464
new file mode 100644
index 0000000..eb9e1f0
--- /dev/null
+++ b/.werks/464
@@ -0,0 +1,8 @@
+Title: stulz_pump: new check for the status of pumps of Stulz clima units
+Level: 1
+Component: checks
+Version: 1.2.5i1
+Date: 1390413752
+Class: feature
+
+
diff --git a/ChangeLog b/ChangeLog
index 4d496fd..25d3ce9 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -59,6 +59,7 @@
* 0462 emcvnx_raidgroups.list_disks: New check for EMC VNX storage system...
* 0463 emcvnx_raidgroups.capacity, emcvnx_raidgroups.capacity_contiguous: New Checks for EMC VNX Storage systems...
* 0570 fileinfo.groups: file groups now allow exclude patterns as well
+ * 0464 stulz_pump: new check for the status of pumps of Stulz clima units
* 0103 FIX: services: Fixed bug with service inventory defined in main.mk...
* 0299 FIX: borcade_mlx_fan: Prettified output, handling "other" state now
* 0300 FIX: cisco_fru_power: Trying not to inventorize not plugged in FRUs...
diff --git a/checkman/stulz_pump b/checkman/stulz_pump
new file mode 100644
index 0000000..c1435b8
--- /dev/null
+++ b/checkman/stulz_pump
@@ -0,0 +1,11 @@
+title: Stulz clima unit pump status
+agents: snmp
+catalog: hw/environment
+license: GPL
+distribution: check_mk
+description:
+ This plugin checks the status of pumps of Stulz clima units. Returns
+ {OK} if the pump is running and {CRIT} if it is not running.
+
+inventory:
+ The inventory will create exactly one service per pump.
diff --git a/checks/stulz_pump b/checks/stulz_pump
new file mode 100644
index 0000000..e3e6ec2
--- /dev/null
+++ b/checks/stulz_pump
@@ -0,0 +1,53 @@
+#!/usr/bin/python
+# -*- encoding: utf-8; py-indent-offset: 4 -*-
+# +------------------------------------------------------------------+
+# | ____ _ _ __ __ _ __ |
+# | / ___| |__ ___ ___| | __ | \/ | |/ / |
+# | | | | '_ \ / _ \/ __| |/ / | |\/| | ' / |
+# | | |___| | | | __/ (__| < | | | | . \ |
+# | \____|_| |_|\___|\___|_|\_\___|_| |_|_|\_\ |
+# | |
+# | Copyright Mathias Kettner 2013 mk(a)mathias-kettner.de |
+# +------------------------------------------------------------------+
+#
+# This file is part of Check_MK.
+# The official homepage is at http://mathias-kettner.de/check_mk.
+#
+# check_mk is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by
+# the Free Software Foundation in version 2. check_mk is distributed
+# in the hope that it will be useful, but WITHOUT ANY WARRANTY; with-
+# out even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE. See the GNU General Public License for more de-
+# ails. You should have received a copy of the GNU General Public
+# License along with GNU Make; see the file COPYING. If not, write
+# to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+# Boston, MA 02110-1301 USA.
+
+def inventory_stulz_pump(info):
+ inventory = []
+ for pump_id, pump_status in info:
+ pump_id = pump_id.replace('.1', '')
+ inventory.append( (pump_id, None) )
+ return inventory
+
+def check_stulz_pump(item, _no_params, info):
+ for pump_id, pump_status in info:
+ pump_id = pump_id.replace('.1', '')
+ if pump_id == item:
+ if pump_status == '1':
+ return 0, "Pump is running"
+ elif pump_status == '0':
+ return 2, "Pump is not running"
+ else:
+ return 3, "Pump reports unidentified status " + pump_status
+ return 3, "Pump %s not found" % item
+
+check_info["stulz_pump"] = {
+ "check_function" : check_stulz_pump,
+ "inventory_function" : inventory_stulz_pump,
+ "service_description" : "Pump %s",
+ "snmp_scan_function" : lambda oid: oid(".1.3.6.1.2.1.1.2.0") == ".1.3.6.1.4.1.29462.10",
+ "snmp_info" : ( ".1.3.6.1.4.1.29462.10.2.1.1.2.1.4.1.1.5802", [ OID_END, 2] ),
+}
+
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;