Module: check_mk
Branch: master
Commit: 787089df3abff0a423db0a7243ec7b0fe8f02184
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=787089df3abff0…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Thu Aug 21 15:02:14 2014 +0200
views: Do not try to fetch a column named "site", it is no column
---
web/htdocs/views.py | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/web/htdocs/views.py b/web/htdocs/views.py
index bfb9c27..26ca660 100644
--- a/web/htdocs/views.py
+++ b/web/htdocs/views.py
@@ -835,6 +835,10 @@ def get_needed_columns(view, painters):
linkview = available_views.get(v)
if linkview:
columns += multisite_datasources[view['datasource']]['idkeys']
+ # The site attribute is no column. Filter it out here
+ if 'site' in columns:
+ columns.remove('site')
+
if len(entry) > 2 and entry[2]:
tt = entry[2]
columns += multisite_painters[tt]["columns"]
Module: check_mk
Branch: master
Commit: 953c2b1734b2ff472a956db5fd9caf331f327294
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=953c2b1734b2ff…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Thu Aug 21 13:12:42 2014 +0200
#1373 SEC Do not ouput complete command line when datasource programs fail
When executing a datasource program like <tt>agent_vsphere</tt>
fails, then Check_MK used to output the complete command line
as plugin output of the Check_MK active check as part of an error
message. The commandline could contain passwords - however. So this
has now been changed into just outputting the path to the executable
(e.g. <tt>/omd/sites/mysite/share/check_mk/agents/special/agent_vsphere</tt>).
---
.werks/1373 | 15 +++++++++++++++
ChangeLog | 1 +
modules/check_mk_base.py | 6 ++++--
3 files changed, 20 insertions(+), 2 deletions(-)
diff --git a/.werks/1373 b/.werks/1373
new file mode 100644
index 0000000..07d43d4
--- /dev/null
+++ b/.werks/1373
@@ -0,0 +1,15 @@
+Title: Do not ouput complete command line when datasource programs fail
+Level: 2
+Component: core
+Class: security
+Compatible: compat
+State: unknown
+Version: 1.2.5i6
+Date: 1408619422
+
+When executing a datasource program like <tt>agent_vsphere</tt>
+fails, then Check_MK used to output the complete command line
+as plugin output of the Check_MK active check as part of an error
+message. The commandline could contain passwords - however. So this
+has now been changed into just outputting the path to the executable
+(e.g. <tt>/omd/sites/mysite/share/check_mk/agents/special/agent_vsphere</tt>).
diff --git a/ChangeLog b/ChangeLog
index 17f90eb..cf9109b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,7 @@
1.2.5i6:
Core & Setup:
* 1008 Overall check timeout for Check_MK checks now defaults to CRIT state...
+ * 1373 SEC: Do not ouput complete command line when datasource programs fail...
Checks & Agents:
* 0185 knuerr_rms_humidity, knuerr_rms_temp: Two new Checks to Monitor the Temperature and the Humidity on Knürr RMS Devices
diff --git a/modules/check_mk_base.py b/modules/check_mk_base.py
index 7d2277e..cd01442 100644
--- a/modules/check_mk_base.py
+++ b/modules/check_mk_base.py
@@ -656,6 +656,8 @@ def get_agent_info(hostname, ipaddress, max_cache_age):
# Get data in case of external program
def get_agent_info_program(commandline):
+ exepath = commandline.split()[0] # for error message, hide options!
+
import subprocess
if opt_verbose:
sys.stderr.write("Calling external program %s\n" % commandline)
@@ -664,11 +666,11 @@ def get_agent_info_program(commandline):
stdout, stderr = p.communicate()
exitstatus = p.returncode
except Exception, e:
- raise MKAgentError("Could not execute '%s': %s" % (commandline, e))
+ raise MKAgentError("Could not execute '%s': %s" % (exepath, e))
if exitstatus:
if exitstatus == 127:
- raise MKAgentError("Program '%s' not found (exit code 127)" % (commandline,))
+ raise MKAgentError("Program '%s' not found (exit code 127)" % exepath)
else:
raise MKAgentError("Agent exited with code %d: %s" % (exitstatus, stderr))
return stdout
Module: check_mk
Branch: master
Commit: b0c726668faf9935a11c9e480195215fa7c29e19
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=b0c726668faf99…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Thu Aug 21 10:24:39 2014 +0200
#1155 NagVis map edit/view permissions can now be set using roles
The view and edit permissions of specific NagVis maps of the local
NagVis installation can now be managed using multisite roles. Each
role can get individual read / modify permissions assigned for each
NagVis map.
This feature is only available in OMD environments.
---
.werks/1155 | 14 ++++++++++++++
ChangeLog | 1 +
web/plugins/wato/nagvis_auth.py | 36 ++++++++++++++++++++++++++++++------
3 files changed, 45 insertions(+), 6 deletions(-)
diff --git a/.werks/1155 b/.werks/1155
new file mode 100644
index 0000000..8524fb4
--- /dev/null
+++ b/.werks/1155
@@ -0,0 +1,14 @@
+Title: NagVis map edit/view permissions can now be set using roles
+Level: 1
+Component: wato
+Compatible: compat
+Version: 1.2.5i6
+Date: 1408609367
+Class: feature
+
+The view and edit permissions of specific NagVis maps of the local
+NagVis installation can now be managed using multisite roles. Each
+role can get individual read / modify permissions assigned for each
+NagVis map.
+
+This feature is only available in OMD environments.
diff --git a/ChangeLog b/ChangeLog
index c9d4a7a..f977d72 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -55,6 +55,7 @@
WATO:
* 1096 New WATO webservices: manage hosts via webinterface...
+ * 1155 NagVis map edit/view permissions can now be set using roles...
* 1064 FIX: Fixed rare issue with WATO communication in distributed setups (different OS versions)...
* 1089 FIX: Snapshot restore: fixed exception during exception handling......
* 1091 FIX: logwatch patterns: allow unicode text in pattern comment
diff --git a/web/plugins/wato/nagvis_auth.py b/web/plugins/wato/nagvis_auth.py
index d3d66cc..a91f53c 100644
--- a/web/plugins/wato/nagvis_auth.py
+++ b/web/plugins/wato/nagvis_auth.py
@@ -36,16 +36,16 @@ config.declare_permission(
)
config.declare_permission(
- 'nagvis.Map_view_*',
- _('View all maps'),
- _('Grants read access to all maps.'),
+ 'nagvis.Rotation_view_*',
+ _('Use all map rotations'),
+ _('Grants read access to all rotations.'),
[ 'guest' ]
)
config.declare_permission(
- 'nagvis.Rotation_view_*',
- _('Use all map rotations'),
- _('Grants read access to all rotations.'),
+ 'nagvis.Map_view_*',
+ _('View all maps'),
+ _('Grants read access to all maps.'),
[ 'guest' ]
)
@@ -62,3 +62,27 @@ config.declare_permission(
_('Permits to delete all maps.'),
[]
)
+
+# Find all NagVis maps in the local installation to register permissions
+# for each map. When no maps can be found skip this problem silently.
+# This only works in OMD environments.
+
+if defaults.omd_root:
+ nagvis_maps_path = defaults.omd_root + '/etc/nagvis/maps'
+ for f in os.listdir(nagvis_maps_path):
+ if f[0] != '.' and f.endswith('.cfg'):
+ map_name = f[:-4]
+
+ config.declare_permission(
+ 'nagvis.Map_view_%s' % map_name,
+ _('Map %s: view') % map_name,
+ _('Grants read access to the NagVis map %s.') % map_name,
+ [ 'guest' ]
+ )
+
+ config.declare_permission(
+ 'nagvis.Map_edit_%s' % map_name,
+ _('Map %s: edit') % map_name,
+ _('Grants modify access to the NagVis map %s.') % map_name,
+ [ ]
+ )
Module: check_mk
Branch: master
Commit: 6df4372aed7b8bb3cd3c17673138716a67a90969
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=6df4372aed7b8b…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Wed Aug 20 17:41:19 2014 +0200
#1145 FIX windows_tasks: handle case correctly where task is currently running
In some cases a Windows task reports state 267009. That was reported as {CRIT} but
in fact means that the task is currently running. It is reported as {OK} now.
---
.werks/1145 | 11 +++++++++++
ChangeLog | 1 +
checks/windows_tasks | 4 +++-
3 files changed, 15 insertions(+), 1 deletion(-)
diff --git a/.werks/1145 b/.werks/1145
new file mode 100644
index 0000000..00a903e
--- /dev/null
+++ b/.werks/1145
@@ -0,0 +1,11 @@
+Title: windows_tasks: handle case correctly where task is currently running
+Level: 1
+Component: checks
+Compatible: compat
+Version: 1.2.5i6
+Date: 1408549221
+Class: fix
+
+In some cases a Windows task reports state 267009. That was reported as {CRIT} but
+in fact means that the task is currently running. It is reported as {OK} now.
+
diff --git a/ChangeLog b/ChangeLog
index 5fc97a5..c9d4a7a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -45,6 +45,7 @@
* 1143 FIX: dell_powerconnect_temp: fix configuration via WATO...
* 1144 FIX: blade_bx_temp, dell_chassis_temp, emerson_temp, ibm_svc_enclosurestats, ups_bat_temp: rename service description...
NOTE: Please refer to the migration notes!
+ * 1145 FIX: windows_tasks: handle case correctly where task is currently running...
Multisite:
* 1066 Implemented Dashboard Designer...
diff --git a/checks/windows_tasks b/checks/windows_tasks
index 46aca6b..2e0c7d6 100644
--- a/checks/windows_tasks
+++ b/checks/windows_tasks
@@ -65,10 +65,12 @@ def check_windows_tasks(item, _no_params, info):
state = 0
label = ""
msg = []
- if last_result != 0:
+ if last_result not in [ 0, 0x00041301 ]: # SCHED_S_TASK_RUNNING
state = 2
label = "(!!)"
msg.append("Service in state: %s%s" % ( last_result, label ) )
+ if last_result == 0x00041301:
+ msg[-1] += " (currently running)"
if values['Scheduled Task State'] != 'Enabled':
msg.append("Task not Enabled(!!)")