Module: check_mk
Branch: master
Commit: ebe5fa2860e6bd629a3be2957b404fbe16d3ed4e
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=ebe5fa2860e6bd…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Mon Apr 13 09:57:34 2015 +0200
#2199 livestatus_status: now in addition check master settings of monitoring core
For example the check will no go critical if notifications are disabled. The
exact states for each situation can be configured via a new WATO rule set.
---
.werks/2199 | 10 ++++
ChangeLog | 1 +
checkman/livestatus_status | 14 +++---
checks/livestatus_status | 88 ++++++++++++++++++++++++----------
web/plugins/wato/check_parameters.py | 27 ++++++++++-
5 files changed, 106 insertions(+), 34 deletions(-)
Diff: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commitdiff;h=ebe5fa2860…
Module: check_mk
Branch: master
Commit: aa2ea70aeeb4b08192d51b47d00e00c92ec2e522
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=aa2ea70aeeb4b0…
Author: Sven Rueß <sr(a)mathias-kettner.de>
Date: Mon Apr 13 08:43:00 2015 +0200
Fixed title of werk #1955
---
.werks/1955 | 2 +-
ChangeLog | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/.werks/1955 b/.werks/1955
index 8722f0a..e6a4b5a 100644
--- a/.werks/1955
+++ b/.werks/1955
@@ -1,4 +1,4 @@
-Title: Fixed status message to show the correct values of limits
+Title: lnx_quota: Fixed status message to show the correct values of limits
Level: 1
Component: checks
Class: fix
diff --git a/ChangeLog b/ChangeLog
index 5091e76..cd3df67 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -317,7 +317,7 @@
* 2172 FIX: Allowing OIDs in checks not starting with a dot again...
* 2173 FIX: mk-job: Fixed quoting of command line arguments
* 2198 FIX: windows_updates: Fix missing warning if reboot required in case forced reboot is in the past...
- * 1955 FIX: Fixed status message to show the correct values of limits...
+ * 1955 FIX: lnx_quota: Fixed status message to show the correct values of limits...
Multisite:
* 1758 Improved exception hander: Shows details without additional debug request, added mailto link for error report...
Module: check_mk
Branch: master
Commit: a8bc79f5fa9576357ba1934764f2c8a76ce40f32
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=a8bc79f5fa9576…
Author: Sven Rueß <sr(a)mathias-kettner.de>
Date: Mon Apr 13 08:06:23 2015 +0200
#1955 FIX Fixed status message to show the correct values of limits
Fixed status message to show the correct values of hard and file limits if
the user exceeded it.
---
.werks/1955 | 11 +++++++++++
ChangeLog | 1 +
checks/lnx_quota | 2 +-
3 files changed, 13 insertions(+), 1 deletion(-)
diff --git a/.werks/1955 b/.werks/1955
new file mode 100644
index 0000000..8722f0a
--- /dev/null
+++ b/.werks/1955
@@ -0,0 +1,11 @@
+Title: Fixed status message to show the correct values of limits
+Level: 1
+Component: checks
+Class: fix
+Compatible: compat
+State: unknown
+Version: 1.2.7i1
+Date: 1428904937
+
+Fixed status message to show the correct values of hard and file limits if
+the user exceeded it.
diff --git a/ChangeLog b/ChangeLog
index bcef5c2..5091e76 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -317,6 +317,7 @@
* 2172 FIX: Allowing OIDs in checks not starting with a dot again...
* 2173 FIX: mk-job: Fixed quoting of command line arguments
* 2198 FIX: windows_updates: Fix missing warning if reboot required in case forced reboot is in the past...
+ * 1955 FIX: Fixed status message to show the correct values of limits...
Multisite:
* 1758 Improved exception hander: Shows details without additional debug request, added mailto link for error report...
diff --git a/checks/lnx_quota b/checks/lnx_quota
index 8250412..751df78 100644
--- a/checks/lnx_quota
+++ b/checks/lnx_quota
@@ -52,7 +52,7 @@ def check_lnx_quota(item, params, info):
output = []
perfdata = []
- fmt = lambda v, w: w == 'files' and '%d files' % v or get_bytes_human_readable(used*1000, 1000)
+ fmt = lambda v, w: w == 'files' and '%d files' % v or get_bytes_human_readable(v*1000, 1000)
for user, values in parsed[item].items():
for what, (used, soft, hard, grace) in [
Module: check_mk
Branch: master
Commit: 5aca793ef9a0a3bbdc970f248c2ac44b344089ee
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=5aca793ef9a0a3…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Fri Apr 10 16:58:26 2015 +0200
#2198 FIX windows_updates: Fix missing warning if reboot required in case forced reboot is in the past
If the plugin reports the next forced reboot to lie in the past then
the check did not warn anymore about a neccessary reboot for applying
the installed patches. Also the code was cleaned up on the dependency
to the Python module <tt>datetime</tt> has been removed.
---
.werks/2198 | 13 +++++++++++++
ChangeLog | 1 +
checks/windows_updates | 48 +++++++++++++++++-------------------------------
3 files changed, 31 insertions(+), 31 deletions(-)
diff --git a/.werks/2198 b/.werks/2198
new file mode 100644
index 0000000..c425f3d
--- /dev/null
+++ b/.werks/2198
@@ -0,0 +1,13 @@
+Title: windows_updates: Fix missing warning if reboot required in case forced reboot is in the past
+Level: 1
+Component: checks
+Class: fix
+Compatible: compat
+State: unknown
+Version: 1.2.7i1
+Date: 1428677837
+
+If the plugin reports the next forced reboot to lie in the past then
+the check did not warn anymore about a neccessary reboot for applying
+the installed patches. Also the code was cleaned up on the dependency
+to the Python module <tt>datetime</tt> has been removed.
diff --git a/ChangeLog b/ChangeLog
index 7738037..bcef5c2 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -316,6 +316,7 @@
* 2192 FIX: check_notify_count": Fix exception in PNP template in case of explit email addresses...
* 2172 FIX: Allowing OIDs in checks not starting with a dot again...
* 2173 FIX: mk-job: Fixed quoting of command line arguments
+ * 2198 FIX: windows_updates: Fix missing warning if reboot required in case forced reboot is in the past...
Multisite:
* 1758 Improved exception hander: Shows details without additional debug request, added mailto link for error report...
diff --git a/checks/windows_updates b/checks/windows_updates
index 717ff52..9c49864 100644
--- a/checks/windows_updates
+++ b/checks/windows_updates
@@ -24,8 +24,6 @@
# to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
# Boston, MA 02110-1301 USA.
-# Author: Lars Michelsen <lm(a)mathias-kettner.de>
-
# <<<windows_updates>>>
# 0 2 5
# Windows XP Service Pack 3 (KB936929); Windows-Tool zum Entfernen sch�dlicher Software - M�rz 2011 (KB890830)
@@ -36,15 +34,13 @@
# Third row: List of all optional updates (optional)
# Last row: Date and time of forced update (optional)
-import datetime
-
windows_updates_default_params = (0, 0, 0, 0, 604800, 172800, True)
def inventory_windows_updates(info):
if info and len(info[0]) == 3:
return [(None, "windows_updates_default_params")]
-def check_windows_updates(_unused, params, info):
+def check_windows_updates(_no_item, params, info):
if info and len(info[0]) == 3:
status = 0
# Workarround to return errors from the plugin
@@ -95,38 +91,28 @@ def check_windows_updates(_unused, params, info):
txt.append(this_txt)
perfdata.append((label, cur, warn, crit))
+ if reboot_required == 1:
+ if status < 1:
+ status = 1
+ txt.append('Reboot required to finish updates(!)')
+
if forced_reboot != "":
- date, time = forced_reboot
- year, month, day = map(int, date.split("-"))
- hour, minute, second = map(int, time.split(":"))
- force_date = datetime.datetime(year, month, day, hour, minute, second)
- now = datetime.datetime.now()
- nix = datetime.timedelta(seconds=0)
+ parsed = time.strptime(" ".join(forced_reboot), "%Y-%m-%d %H:%M:%S")
+ now = int(time.time())
+ delta = time.mktime(parsed) - now
+
# check if force_date is in the future
- if force_date - now > nix:
- if force_crit:
- diff_crit = datetime.timedelta(seconds=force_crit)
- else:
- diff_crit = None
- if force_warn:
- diff_warn = datetime.timedelta(seconds=force_warn)
- else:
- diff_warn = None
+ if delta >= 0:
sym = ""
- if diff_crit and diff_crit > force_date - now:
- status = 2
+ if force_crit and delta <= force_crit:
sym = "(!!)"
- elif diff_warn and diff_warn > force_date - now:
- if status < 1:
- status = 1
+ status = 2
+ elif force_warn and delta <= force_warn:
sym = "(!)"
- boot_txt = ('Reboot enforced on %s to finish updates %s') \
- % ( " ".join(forced_reboot), sym )
+ status = max(status, 1)
+
+ boot_txt = 'Reboot enforced in %s to finish updates%s' % (get_age_human_readable(delta), sym)
txt.append(boot_txt)
- elif reboot_required == 1:
- if status < 1:
- status = 1
- txt.append('Reboot required to finish updates (!)')
return (status, ', '.join(txt), perfdata)
Module: check_mk
Branch: master
Commit: 028b46e11a846c1b05d00652c35fe31cf3428527
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=028b46e11a846c…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Fri Apr 10 15:09:39 2015 +0200
#2197 FIX win_reg_uninstall: Fix exception in case of invalid output line
Might be cased by a software with vertical bars in the name. This happended
for <tt>Symantec Backup Exec Remote Agent for Windows</tt>. The reason is
unclear.
---
.werks/2197 | 12 ++++++++++++
ChangeLog | 1 +
inventory/win_reg_uninstall | 3 +++
3 files changed, 16 insertions(+)
diff --git a/.werks/2197 b/.werks/2197
new file mode 100644
index 0000000..610ca76
--- /dev/null
+++ b/.werks/2197
@@ -0,0 +1,12 @@
+Title: win_reg_uninstall: Fix exception in case of invalid output line
+Level: 1
+Component: inv
+Class: fix
+Compatible: compat
+State: unknown
+Version: 1.2.7i1
+Date: 1428671316
+
+Might be cased by a software with vertical bars in the name. This happended
+for <tt>Symantec Backup Exec Remote Agent for Windows</tt>. The reason is
+unclear.
diff --git a/ChangeLog b/ChangeLog
index bc3240a..a2308b4 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -480,6 +480,7 @@
* 2147 FIX: Fixed exception in HW-/SW-Inventory GUI with special characters in inventorized data...
* 2148 FIX: win_os: Fixed inventory of OS with older powershell versions
* 2108 FIX: win_bios win_disks win_system win_video: these inventory checks can now handle colons in the output
+ * 2197 FIX: win_reg_uninstall: Fix exception in case of invalid output line...
1.2.6b1:
diff --git a/inventory/win_reg_uninstall b/inventory/win_reg_uninstall
index 1cd4525..63c3581 100644
--- a/inventory/win_reg_uninstall
+++ b/inventory/win_reg_uninstall
@@ -31,6 +31,9 @@
def inv_win_reg_uninstall(info):
paclist = inv_tree("software.packages:")
for line in info:
+ if len(line) != 7:
+ continue
+
display_name, publisher, path, pacname, version, estimated_size, date = line
install_date = ""
if re.match("^20\d{6}", date):