Module: check_mk
Branch: master
Commit: f23a036a88e94022dc7c98eb222068e45020c980
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=f23a036a88e940…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Fri Jul 17 13:36:20 2015 +0200
#2470 FIX Fixed exception in logwatch log list in rare cases
When logfiles for a host exists which have only a log section header
without related log lines, this could lead to an exception in the GUI
when listing all existing logs.
---
.werks/2470 | 12 ++++++++++++
ChangeLog | 3 ++-
web/htdocs/logwatch.py | 8 ++++----
3 files changed, 18 insertions(+), 5 deletions(-)
diff --git a/.werks/2470 b/.werks/2470
new file mode 100644
index 0000000..e75175a
--- /dev/null
+++ b/.werks/2470
@@ -0,0 +1,12 @@
+Title: Fixed exception in logwatch log list in rare cases
+Level: 1
+Component: multisite
+Class: fix
+Compatible: compat
+State: unknown
+Version: 1.2.7i3
+Date: 1437132921
+
+When logfiles for a host exists which have only a log section header
+without related log lines, this could lead to an exception in the GUI
+when listing all existing logs.
diff --git a/ChangeLog b/ChangeLog
index 6ef63ed..5f983df 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -58,8 +58,8 @@
* 2403 FIX: ibm_imm_fan: fixed exception with invalid formatted fan speed information...
* 2404 FIX: apache_status: now able to handle BusyServers and IdleServers...
* 2406 FIX: fileinfo: fixed missing size performance data for very large (e.g 2TB) files and fileinfo groups...
- * 2408 FIX: ibm_imm_fan: fixed exception while parsing fan percentage values
* 2450 FIX: citrix_serverload: Changed representation of load to percent in rule and graphs, added perfometer
+ * 2408 FIX: ibm_imm_fan: fixed exception while parsing fan percentage values
* 2469 FIX: Fixed service discovery on SNMP host having no system description OID
Multisite:
@@ -81,6 +81,7 @@
* 2396 FIX: LDAP: Fixed handling of LDAP trees having special chars in the path (e.g. in OU names)...
* 2459 FIX: Preventing caching of all HTTP requests to dynamic pages (*.py)...
* 2468 FIX: Fixed actions for duplicate host names on different sites...
+ * 2470 FIX: Fixed exception in logwatch log list in rare cases...
WATO:
* 2365 Removed old deprecated notification global options for plain emails...
diff --git a/web/htdocs/logwatch.py b/web/htdocs/logwatch.py
index bd451ed..80af138 100644
--- a/web/htdocs/logwatch.py
+++ b/web/htdocs/logwatch.py
@@ -131,7 +131,7 @@ def list_logs(host, logfiles):
logs = parse_file(host, log_file)
if logs == [] or type(logs) != list: # corrupted logfile
if logs == []: logs = "empty"
- html.write("<tr class=%s0>\n" % (rowno % 2 == 0 and "odd" or "even"))
+ html.write("<tr class=\"data %s0\">\n" % (rowno % 2 == 0 and "odd" or "even"))
html.write("<td>-</td><td>%s</td><td>%s</td><td>0</td></tr>\n" %
(html.attrencode(logs), html.attrencode(file_display)))
else:
@@ -139,7 +139,7 @@ def list_logs(host, logfiles):
last_log = get_last_log(logs)
state = worst_log['level']
state_name = form_level(state)
- html.write("<tr class=%s%d>\n" % (rowno % 2 == 0 and "odd" or "even", state))
+ html.write("<tr class=\"data %s%d\">\n" % (rowno % 2 == 0 and "odd" or "even", state))
html.write("<td class=\"state%d\">%s</td>\n" % (state, state_name))
html.write("<td><a href=\"%s\">%s</a></td>\n" %
@@ -148,7 +148,7 @@ def list_logs(host, logfiles):
(form_datetime(last_log['datetime']), len(logs)))
if rowno == 0:
- html.write('<tr><td colspan=4>'+_('No logs found for this host.')+'</td></tr>\n')
+ html.write('<tr><td class="data" colspan=4>'+_('No logs found for this host.')+'</td></tr>\n')
def ack_button(host = None, int_filename = None):
@@ -292,7 +292,7 @@ def do_log_ack(host, filename):
def get_worst_log(logs):
worst_level = 0
- worst_log = None
+ worst_log = logs[0]
for log in logs:
for line in log['lines']:
Module: check_mk
Branch: master
Commit: 80d46419c960b41ba994b74255e9c7645a9ae532
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=80d46419c960b4…
Author: Andreas Boesl <ab(a)mathias-kettner.de>
Date: Fri Jul 17 11:00:06 2015 +0200
#2407 FIX WATO master/slave replication: fixed problem where the configuration from the master site was not activate on slave site
Changes made on a distributed WATO slave site could delay a configuration update attempt from the master.
Detailed information: Any changes on a slave site which lead to a pending log entry triggered the cmcrushd.
The cmcrushd creates a configuration for the microcore, which takes precendence over creating the configuration anew.
When a snapshot got pushed from the master site, the slave site thought that there is already a precompiled configuration
available and used the cmcrushd configuration.
This problem is automatically resolved on the following configuration push from the master,
because the cmcrushd configuration is only used once.
---
.werks/2407 | 18 ++++++++++++++++++
ChangeLog | 1 +
web/htdocs/wato.py | 7 ++++++-
3 files changed, 25 insertions(+), 1 deletion(-)
diff --git a/.werks/2407 b/.werks/2407
new file mode 100644
index 0000000..00d3674
--- /dev/null
+++ b/.werks/2407
@@ -0,0 +1,18 @@
+Title: WATO master/slave replication: fixed problem where the configuration from the master site was not activate on slave site
+Level: 2
+Component: wato
+Class: fix
+Compatible: compat
+State: unknown
+Version: 1.2.7i3
+Date: 1437116656
+
+Changes made on a distributed WATO slave site could delay a configuration update attempt from the master.
+
+Detailed information: Any changes on a slave site which lead to a pending log entry triggered the cmcrushd.
+The cmcrushd creates a configuration for the microcore, which takes precendence over creating the configuration anew.
+When a snapshot got pushed from the master site, the slave site thought that there is already a precompiled configuration
+available and used the cmcrushd configuration.
+
+This problem is automatically resolved on the following configuration push from the master,
+because the cmcrushd configuration is only used once.
diff --git a/ChangeLog b/ChangeLog
index bf7dd49..4f4bed8 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -95,6 +95,7 @@
* 2464 FIX: UDP ports for SNMP communication can now be configured via WATO
* 2466 FIX: Fixed exception when searching for rulesets / global settings using special characters like umlauts
* 2467 FIX: Fixed encoding exception occuring in localized GUI when a WATO action triggers an error message...
+ * 2407 FIX: WATO master/slave replication: fixed problem where the configuration from the master site was not activate on slave site...
Notifications:
* 2313 FIX: notification bulking: fixed exception for plugins which are not configured with checkboxes, e.g. sms
diff --git a/web/htdocs/wato.py b/web/htdocs/wato.py
index a202509..02e0142 100644
--- a/web/htdocs/wato.py
+++ b/web/htdocs/wato.py
@@ -5119,7 +5119,9 @@ def log_pending(status, linkinfo, what, message, user_id = None):
if 'need_to_bake_agents' in globals():
need_to_bake_agents()
- if not is_distributed():
+ # The latter one condition applies to slave sites
+ # Otherwise slave sites would trigger the cmcrushd
+ if not is_distributed() and not has_distributed_wato_file():
if status != SYNC:
log_entry(linkinfo, what, message, "pending.log", user_id)
cmc_rush_ahead()
@@ -11999,6 +12001,9 @@ def delete_distributed_wato_file():
if os.path.exists(p):
create_user_file(p, "w").write("")
+def has_distributed_wato_file():
+ return os.path.exists(defaults.check_mk_configdir + "/distributed_wato.mk")
+
#.
# .--Users/Contacts------------------------------------------------------.
# | _ _ ______ _ _ |
Module: check_mk
Branch: master
Commit: e95cca92f7a7836b1337d3119362b0006403818f
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=e95cca92f7a783…
Author: Bastian Kuhn <bk(a)mathias-kettner.de>
Date: Thu Jul 16 16:49:01 2015 +0200
changed bvip checks a bit
---
checkman/bvip_cams | 12 -----------
checkman/bvip_video_alerts | 2 +-
checks/bvip_cams | 47 --------------------------------------------
checks/bvip_video_alerts | 25 +++++++++++------------
4 files changed, 12 insertions(+), 74 deletions(-)
diff --git a/checkman/bvip_cams b/checkman/bvip_cams
deleted file mode 100644
index e79bc94..0000000
--- a/checkman/bvip_cams
+++ /dev/null
@@ -1,12 +0,0 @@
-title: Bosch Video over IP: Cameras
-agents: snmp
-catalog: hw/environment/bosch
-license: GPL
-distribution: check_mk
-description:
- This Checks gaters the list of cameras on Bosch Videos Systems.
- If multipe Cameras connected behind one IP Adress, this Check helps
- to identify them and reports {CRIT} for each camera who gets lost.
-
-inventory:
- Creates one check.
diff --git a/checkman/bvip_video_alerts b/checkman/bvip_video_alerts
index 3bfd4f9..22f2415 100644
--- a/checkman/bvip_video_alerts
+++ b/checkman/bvip_video_alerts
@@ -8,5 +8,5 @@ description:
no picture from the lense), it will be reported.
inventory:
- Creates one check .
+ Creates one check per camera.
diff --git a/checks/bvip_cams b/checks/bvip_cams
deleted file mode 100644
index 4de2ffd..0000000
--- a/checks/bvip_cams
+++ /dev/null
@@ -1,47 +0,0 @@
-#!/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_bvip_cams(info):
- return [(None, {'cameras' : [ x[0] for x in info ]})]
-
-def check_bvip_cams(_no_item, params, info):
- for line in info:
- camera = line[0]
- if camera not in params['cameras']:
- yield 2, "Missing: %s" % cameras
- else:
- yield 0, camera
-
-
-check_info["bvip_cams"] = {
- "check_function" : check_bvip_cams,
- "inventory_function" : inventory_bvip_cams,
- "service_description" : "Cameras",
- "snmp_scan_function" : bvip_scan_function,
- "snmp_info" : (".1.3.6.1.4.1.3967.1.1.1.3", [ 1 ]),
- "includes" : [ 'bvip.include' ],
-}
-
diff --git a/checks/bvip_video_alerts b/checks/bvip_video_alerts
index 035bafc..3bc2cca 100644
--- a/checks/bvip_video_alerts
+++ b/checks/bvip_video_alerts
@@ -26,27 +26,24 @@
def inventory_bvip_video_alerts(info):
- return [(None, None)]
+ for cam, alerts in info:
+ yield cam, None
+
+def check_bvip_video_alerts(item, _no_params, info):
+ for cam, alerts in info:
+ if cam == item:
+ if alerts != '0':
+ return 2, "Device on Alarm State"
+ else:
+ return 0, "No alarms"
-def check_bvip_video_alerts(_no_item, _no_params, info):
- total = 0
- alerts = 0
- for line in info:
- state = int(line[0])
- total += 1
- if state != 0:
- alerts += 1
- state = 0
- if alerts != 0:
- state = 2
- return state, "Cams: %s, Alerts: %s" % ( total, alerts )
check_info["bvip_video_alerts"] = {
"check_function" : check_bvip_video_alerts,
"inventory_function" : inventory_bvip_video_alerts,
"service_description" : "Video Alerts",
"snmp_scan_function" : bvip_scan_function,
- "snmp_info" : (".1.3.6.1.4.1.3967.1.3.1", [ 1 ]),
+ "snmp_info" : (".1.3.6.1.4.1.3967.1", [ "1.1.3.1" , "3.1.1"]),
"includes" : [ 'bvip.include' ],
}
Module: check_mk
Branch: master
Commit: 1505bc9033aab64632d272765c80235c77a3ead4
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=1505bc9033aab6…
Author: Andreas Boesl <ab(a)mathias-kettner.de>
Date: Thu Jul 16 15:33:56 2015 +0200
#2406 FIX fileinfo: fixed missing size performance data for very large (e.g 2TB) files and fileinfo groups
The fileinfo check failed to report the performance data value <i>size</i> for very
large files. As a result the perfometer and graphs were broken.
---
.werks/2406 | 12 ++++++++++++
ChangeLog | 3 ++-
checks/fileinfo | 2 +-
3 files changed, 15 insertions(+), 2 deletions(-)
diff --git a/.werks/2406 b/.werks/2406
new file mode 100644
index 0000000..02594c5
--- /dev/null
+++ b/.werks/2406
@@ -0,0 +1,12 @@
+Title: fileinfo: fixed missing size performance data for very large (e.g 2TB) files and fileinfo groups
+Level: 1
+Component: checks
+Class: fix
+Compatible: compat
+State: unknown
+Version: 1.2.7i3
+Date: 1437053468
+
+The fileinfo check failed to report the performance data value <i>size</i> for very
+large files. As a result the perfometer and graphs were broken.
+
diff --git a/ChangeLog b/ChangeLog
index 01d16a6..bf7dd49 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -20,7 +20,7 @@
* 1272 alcatel_power, alcatel_temp Support for stacked environments...
NOTE: Please refer to the migration notes!
* 1273 bvip_cams, bvip_fans, bvip_info, bvip_link, bvip_poe, bvip_temp, bvip_util, bvip_video_alerts: New Checks for Bosch Video over IP Cameras
- * 2405 New checks for UCS bladecenter: ucs_bladecenter_topsystem, ucs_bladecenter_faultinst...
+ * 2405 New checks for UCS bladecenter: ucs_bladecenter_topsystem, ucs_bladecenter_faulinst...
* 2315 FIX: windows agent: BOM replacement, fixed incorrect byte offset...
* 2316 FIX: windows agent: fix garbled output of cached agent plugins...
* 2358 FIX: check_mk_agent.solaris: more correct computation of zfs used space...
@@ -57,6 +57,7 @@
* 2402 FIX: netapp_api_disk: fixed broken WATO and check configuration...
* 2403 FIX: ibm_imm_fan: fixed exception with invalid formatted fan speed information...
* 2404 FIX: apache_status: now able to handle BusyServers and IdleServers...
+ * 2406 FIX: fileinfo: fixed missing size performance data for very large (e.g 2TB) files and fileinfo groups...
Multisite:
* 2385 SEC: Fixed possible reflected XSS on all GUI pages where users can produce unhandled exceptions...
diff --git a/checks/fileinfo b/checks/fileinfo
index fbb92ca..e8cf6e2 100644
--- a/checks/fileinfo
+++ b/checks/fileinfo
@@ -218,7 +218,7 @@ def fileinfo_check_function(check_definition, params, outof_range_txt):
perfdata = []
for what, val, verbfunc in check_definition:
infos.append("%s is %s" % (what, verbfunc(val)))
- if type(val) == int: # because strings go into infos but not into perfdata
+ if type(val) in [long, int]: # because strings go into infos but not into perfdata
warn, crit = "", ""
for how, comp, cfunc in [ ("min", "<", operator.lt), ("max", ">", operator.gt) ]:
p = params.get(how + what)