Module: check_mk
Branch: master
Commit: 578ca29713f57b28e559ad421303b2f5e6d625e4
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=578ca29713f57b…
Author: Goetz Golla <gg(a)mathias-kettner.de>
Date: Wed Jul 15 16:16:27 2015 +0200
Updated bug entries #2343
---
.bugs/2343 | 17 +++++++++++++++++
1 file changed, 17 insertions(+)
diff --git a/.bugs/2343 b/.bugs/2343
new file mode 100644
index 0000000..5e60e70
--- /dev/null
+++ b/.bugs/2343
@@ -0,0 +1,17 @@
+Title: cmk --inventory-as-check does not take into account disabled services
+Component: ore
+State: open
+Date: 2015-07-15 16:09:54
+Targetversion: 1.2.7
+Class: bug
+
+If I disable the 'Log .*$' Services with a 'Disable Services' rule,
+cmk --inventory-as-check still reports the unchecked Log services,
+even if I also disable the logwatch _check_. It also reports the unchecked
+DISK IO Summary Service, even though we have choosen to use the detailed
+DISK IO view only.
+
+If I only disable the logwatch _check_, but not the _service_,
+cmk --inventory-as-check works as expected, i.e. no unchecked services
+are reported, neither logwatch not DISK IO Summary services.
+
Module: check_mk
Branch: master
Commit: 7ece47be285050333e471e63a462bc9923819443
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=7ece47be285050…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Wed Jul 15 10:50:34 2015 +0200
#2464 FIX UDP ports for SNMP communication can now be configured via WATO
---
.werks/2464 | 10 ++++++++++
ChangeLog | 1 +
web/plugins/wato/check_mk_configuration.py | 12 ++++++++++++
3 files changed, 23 insertions(+)
diff --git a/.werks/2464 b/.werks/2464
new file mode 100644
index 0000000..bed50f5
--- /dev/null
+++ b/.werks/2464
@@ -0,0 +1,10 @@
+Title: UDP ports for SNMP communication can now be configured via WATO
+Level: 1
+Component: wato
+Class: fix
+Compatible: compat
+State: unknown
+Version: 1.2.7i3
+Date: 1436949085
+
+
diff --git a/ChangeLog b/ChangeLog
index b5de20e..13dc5b6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -83,6 +83,7 @@
* 1267 FIX: Fixed confirm activating foreign changes dialog...
* 2397 FIX: Fixed wrong confirm text in distributed setup when activating foreign changes
* 2461 FIX: Service Discovery: Hiding action buttons to rules when user is not permitted to rulesets
+ * 2464 FIX: UDP ports for SNMP communication can now be configured via WATO
Notifications:
* 2313 FIX: notification bulking: fixed exception for plugins which are not configured with checkboxes, e.g. sms
diff --git a/web/plugins/wato/check_mk_configuration.py b/web/plugins/wato/check_mk_configuration.py
index a3462f0..5763922 100644
--- a/web/plugins/wato/check_mk_configuration.py
+++ b/web/plugins/wato/check_mk_configuration.py
@@ -1887,6 +1887,18 @@ register_rule(group,
"is configured with this ruleset will then use the information from that "
"file instead of using real SNMP. "))
+register_rule(group,
+ "snmp_ports",
+ Integer(
+ minvalue = 1,
+ maxvalue = 65535,
+ default_value = 161
+ ),
+ title = _("UDP port used for SNMP"),
+ help = _("This variable allows you to customize the UDP port to "
+ "be used to communicate via SNMP on a per-host-basis."),
+)
+
group = "agent/" + _("Check_MK Agent")
register_rule(group,
Module: check_mk
Branch: master
Commit: 111eb3b697ac24b809dc0dd8a06381d205cf433e
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=111eb3b697ac24…
Author: Andreas Boesl <ab(a)mathias-kettner.de>
Date: Tue Jul 14 15:41:58 2015 +0200
Updated bug entries #2176
---
.bugs/2176 | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/.bugs/2176 b/.bugs/2176
new file mode 100644
index 0000000..705cf9e
--- /dev/null
+++ b/.bugs/2176
@@ -0,0 +1,10 @@
+Title: logwatch: files with timestamps, initial text missing
+Component: checks
+State: open
+Date: 2015-07-14 15:39:17
+Targetversion: future
+Class: bug
+
+If logwatch detects a new logfile it starts at the end of this file.
+If a logfile is generated daily with a new timestamp the initial lines
+are skipped and error messages might get lost.
Module: check_mk
Branch: master
Commit: 01edfb86aa57eb5f114e6ff648609140985adc5f
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=01edfb86aa57eb…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Tue Jul 14 13:55:25 2015 +0200
#2463 Hiding not permitted actions from service discovery page when only permitted on host
When users are only permitted on hosts/folders in WATO, the service discovery page showed
buttons and action icons which resulted in an error message when a user not having permissions
on the services clicked on them. These action buttons are now hidden when the user is not
permitted, making the page read-only when user is only permitted to host.
---
.werks/2463 | 12 ++++++++++++
ChangeLog | 1 +
web/htdocs/wato.py | 30 ++++++++++++++++++------------
3 files changed, 31 insertions(+), 12 deletions(-)
diff --git a/.werks/2463 b/.werks/2463
new file mode 100644
index 0000000..68e2f83
--- /dev/null
+++ b/.werks/2463
@@ -0,0 +1,12 @@
+Title: Hiding not permitted actions from service discovery page when only permitted on host
+Level: 1
+Component: wato
+Compatible: compat
+Version: 1.2.7i3
+Date: 1436874839
+Class: feature
+
+When users are only permitted on hosts/folders in WATO, the service discovery page showed
+buttons and action icons which resulted in an error message when a user not having permissions
+on the services clicked on them. These action buttons are now hidden when the user is not
+permitted, making the page read-only when user is only permitted to host.
diff --git a/ChangeLog b/ChangeLog
index 643f20c..b5de20e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -76,6 +76,7 @@
* 2386 SEC: Fixed possible XSS on WATO rule edit page...
* 2373 Skip unmonitored hosts during bulk discovery...
* 2462 Users with access to host/services can now edit the disabled services rule for their hosts/folders...
+ * 2463 Hiding not permitted actions from service discovery page when only permitted on host...
* 2344 FIX: Improved validation of selected rules when editing BI aggregations...
* 2346 FIX: Notifications: Fixed garbled page when switching on/off bulks/backlog/user rules
* 2372 FIX: Avoid freezing WATO during bulk discovery if hosts do not respond in a timely manner
diff --git a/web/htdocs/wato.py b/web/htdocs/wato.py
index e8cc938..7a96de5 100644
--- a/web/htdocs/wato.py
+++ b/web/htdocs/wato.py
@@ -1450,7 +1450,10 @@ def show_hosts(folder):
if config.may("wato.rulesets"):
html.icon_button(params_url, _("View the rule based parameters of this host"), "rulesets")
if check_host_permissions(hostname, False) == True:
- msg = _("Edit the services of this host, do a service discovery")
+ if config.may("wato.services"):
+ msg = _("Edit the services of this host, do a service discovery")
+ else:
+ msg = _("Display the services of this host")
image = "services"
if host.get("inventory_failed"):
image = "inventory_failed"
@@ -3130,13 +3133,12 @@ def mode_inventory(phase, firsttime):
# only display for non cluster hosts
html.context_button(_("Diagnostic"),
make_link([("mode", "diag_host"), ("host", hostname)]), "diagnose")
- html.context_button(_("Full Scan"), html.makeuri([("_scan", "yes")]))
+ if config.may("wato.services"):
+ html.context_button(_("Full Scan"), html.makeuri([("_scan", "yes")]))
elif phase == "action":
- config.need_permission("wato.services")
check_host_permissions(hostname)
if html.check_transaction():
-
# Settings for showing parameters
if html.var("_show_parameters"):
parameter_column = True
@@ -3147,6 +3149,8 @@ def mode_inventory(phase, firsttime):
config.save_user_file("parameter_column", False)
return
+ config.need_permission("wato.services")
+
cache_options = html.var("_scan") and [ '@scan' ] or [ '@noscan' ]
new_target = "folder"
@@ -3241,10 +3245,11 @@ def show_service_table(host, firsttime):
html.button("_refresh", _("Automatic Refresh (Tabula Rasa)"))
html.write(" ")
- if parameter_column:
- html.button("_hide_parameters", _("Hide Check Parameters"))
- else:
- html.button("_show_parameters", _("Show Check Parameters"))
+
+ if parameter_column:
+ html.button("_hide_parameters", _("Hide Check Parameters"))
+ else:
+ html.button("_show_parameters", _("Show Check Parameters"))
html.hidden_fields()
if html.var("_scan"):
@@ -3368,10 +3373,11 @@ def show_service_table(host, firsttime):
html.icon_button(url, _("Create rule to permanently disable this service"), "ignore")
# Temporary ignore checkbox
- table.cell()
- if checkbox != None:
- varname = "_%s_%s" % (ct, html.varencode(item))
- html.checkbox(varname, checkbox, add_attr = ['title="%s"' % _('Temporarily ignore this service')])
+ if config.may("wato.services"):
+ table.cell()
+ if checkbox != None:
+ varname = "_%s_%s" % (ct, html.varencode(item))
+ html.checkbox(varname, checkbox, add_attr = ['title="%s"' % _('Temporarily ignore this service')])
table.end()
html.end_form()
services can now edit the disabled services rule for their hosts/folders
Message-ID: <55a4f0e7.d+3xCh6YglfDK1Hs%lm(a)mathias-kettner.de>
User-Agent: Heirloom mailx 12.5 6/20/10
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Module: check_mk
Branch: master
Commit: 5a3477777c82db4a11fef34f18dda61cf4954e26
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=5a3477777c82db…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Tue Jul 14 13:21:17 2015 +0200
#2462 Users with access to host/services can now edit the disabled services rule for their hosts/folders
In previous versions it was only possible to permit users to edit either all rulesets or no ruleset
related to the folders they are permitted for.
For example users were able to edit their hosts in their WATO folders, perform services discoveries
on these hosts, but were not able to configure the disabled services for these hosts. This has been
changed now for the "Disabled Services" ruleset.
---
.werks/2462 | 14 +++++++++++++
ChangeLog | 1 +
web/htdocs/wato.py | 58 +++++++++++++++++++++++++++++++++-------------------
3 files changed, 52 insertions(+), 21 deletions(-)
diff --git a/.werks/2462 b/.werks/2462
new file mode 100644
index 0000000..ba7e912
--- /dev/null
+++ b/.werks/2462
@@ -0,0 +1,14 @@
+Title: Users with access to host/services can now edit the disabled services rule for their hosts/folders
+Level: 1
+Component: wato
+Compatible: compat
+Version: 1.2.7i3
+Date: 1436872721
+Class: feature
+
+In previous versions it was only possible to permit users to edit either all rulesets or no ruleset
+related to the folders they are permitted for.
+
+For example users were able to edit their hosts in their WATO folders, perform services discoveries
+on these hosts, but were not able to configure the disabled services for these hosts. This has been
+changed now for the "Disabled Services" ruleset.
diff --git a/ChangeLog b/ChangeLog
index 580f3a5..d6f7410 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -73,6 +73,7 @@
* 2384 SEC: Prevent user passwords from being visible in webserver log on user creation...
* 2386 SEC: Fixed possible XSS on WATO rule edit page...
* 2373 Skip unmonitored hosts during bulk discovery...
+ * 2462 Users with access to host/services can now edit the disabled services rule for their hosts/folders...
* 2344 FIX: Improved validation of selected rules when editing BI aggregations...
* 2346 FIX: Notifications: Fixed garbled page when switching on/off bulks/backlog/user rules
* 2372 FIX: Avoid freezing WATO during bulk discovery if hosts do not respond in a timely manner
diff --git a/web/htdocs/wato.py b/web/htdocs/wato.py
index 61915cc..e8cc938 100644
--- a/web/htdocs/wato.py
+++ b/web/htdocs/wato.py
@@ -1447,7 +1447,8 @@ def show_hosts(folder):
table.cell(_("Actions"), css="buttons", sortable=False)
html.icon_button(edit_url, _("Edit the properties of this host"), "edit")
- html.icon_button(params_url, _("View the rule based parameters of this host"), "rulesets")
+ if config.may("wato.rulesets"):
+ html.icon_button(params_url, _("View the rule based parameters of this host"), "rulesets")
if check_host_permissions(hostname, False) == True:
msg = _("Edit the services of this host, do a service discovery")
image = "services"
@@ -3344,9 +3345,7 @@ def show_service_table(host, firsttime):
manpage_url = make_link([("mode", "check_manpage"), ("check_type", ctype)])
html.icon_button(manpage_url, _("View the manual page of the check plugin"), "check_plugins")
- can_access_disabled_services_rules = config.may('wato.rulesets')
-
- if check_source == "ignored" and can_access_disabled_services_rules:
+ if check_source == "ignored" and may_edit_ruleset("ignored_services"):
url = make_link([("mode", "edit_ruleset"),
("varname", "ignored_services"),
("host", hostname),
@@ -3354,7 +3353,7 @@ def show_service_table(host, firsttime):
html.icon_button(url, _("Edit and analyze the disabled services rules"), "ignore")
# Permanently disable icon
- if check_source in ['new', 'old'] and can_access_disabled_services_rules:
+ if check_source in ['new', 'old'] and may_edit_ruleset("ignored_services"):
url = make_link([
('mode', 'edit_ruleset'),
('varname', 'ignored_services'),
@@ -14663,9 +14662,13 @@ def create_new_rule_form(rulespec, hostname = None, item = None, varname = None)
html.hidden_field('folder', html.var('folder'))
html.end_form()
+
def mode_edit_ruleset(phase):
varname = html.var("varname")
+ if not may_edit_ruleset(varname):
+ raise MKAuthException(_("You are not permitted to access this ruleset."))
+
item = None
if html.var("check_command"):
check_command = html.var("check_command")
@@ -14714,20 +14717,24 @@ def mode_edit_ruleset(phase):
elif phase == "buttons":
global_buttons()
- if not rulespec:
- html.context_button(_("All Rulesets"), make_link([("mode", "ruleeditor")]), "back")
- else:
- group = rulespec["group"].split("/")[0]
- groupname = g_rulegroups[group][0]
- html.context_button(groupname,
- make_link([("mode", "rulesets"), ("group", group), ("host", hostname)]), "back")
- html.context_button(_("Used Rulesets"),
- make_link([("mode", "rulesets"), ("group", "used"), ("host", hostname)]), "usedrulesets")
+
+ if config.may('wato.rulesets'):
+ if not rulespec:
+ html.context_button(_("All Rulesets"), make_link([("mode", "ruleeditor")]), "back")
+ else:
+ group = rulespec["group"].split("/")[0]
+ groupname = g_rulegroups[group][0]
+ html.context_button(groupname,
+ make_link([("mode", "rulesets"), ("group", group), ("host", hostname)]), "back")
+ html.context_button(_("Used Rulesets"),
+ make_link([("mode", "rulesets"), ("group", "used"), ("host", hostname)]), "usedrulesets")
+
if hostname:
html.context_button(_("Services"),
make_link([("mode", "inventory"), ("host", hostname)]), "services")
- html.context_button(_("Parameters"),
- make_link([("mode", "object_parameters"), ("host", hostname), ("service", item)]), "rulesets")
+ if config.may('wato.rulesets'):
+ html.context_button(_("Parameters"),
+ make_link([("mode", "object_parameters"), ("host", hostname), ("service", item)]), "rulesets")
return
elif phase == "action":
@@ -15312,9 +15319,11 @@ def date_and_user():
def mode_edit_rule(phase, new = False):
- # Due to localization this cannot be defined in the global context!
-
varname = html.var("varname")
+
+ if not may_edit_ruleset(varname):
+ raise MKAuthException(_("You are not permitted to access this ruleset."))
+
rulespec = g_rulespecs[varname]
back_mode = html.var('back_mode', 'edit_ruleset')
@@ -19139,6 +19148,13 @@ def validate_all_hosts(hostnames, force_all = False):
# | Functions needed at various places |
# '----------------------------------------------------------------------'
+def may_edit_ruleset(varname):
+ if varname == "ignored_services":
+ return config.may("wato.services") or config.may("wato.rulesets")
+ else:
+ return config.may("wato.rulesets")
+
+
import base64
def mk_eval(s):
@@ -19559,9 +19575,9 @@ modes = {
"check_manpage" : ([], mode_check_manpage),
"rulesets" : (["rulesets"], mode_rulesets),
"ineffective_rules" : (["rulesets"], mode_ineffective_rules),
- "edit_ruleset" : (["rulesets"], mode_edit_ruleset),
- "new_rule" : (["rulesets"], lambda phase: mode_edit_rule(phase, True)),
- "edit_rule" : (["rulesets"], lambda phase: mode_edit_rule(phase, False)),
+ "edit_ruleset" : ([], mode_edit_ruleset),
+ "new_rule" : ([], lambda phase: mode_edit_rule(phase, True)),
+ "edit_rule" : ([], lambda phase: mode_edit_rule(phase, False)),
"host_groups" : (["groups"], lambda phase: mode_groups(phase, "host")),
"service_groups" : (["groups"], lambda phase: mode_groups(phase, "service")),
"contact_groups" : (["users"], lambda phase: mode_groups(phase, "contact")),
Module: check_mk
Branch: master
Commit: 15c277a2dff282a205cbf0ece432645408feaf71
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=15c277a2dff282…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Tue Jul 14 11:42:51 2015 +0200
#2460 FIX Slightly more robust SNMP trap translation
SNMP traps having specific OIDs, like e.g. just ".1.3.6.1" were causing
an exception when the Event Console tried to parse them. This has been
changed to be more robust now.
---
.werks/2460 | 11 +++++++++++
ChangeLog | 1 +
mkeventd/bin/mkeventd | 5 ++++-
3 files changed, 16 insertions(+), 1 deletion(-)
diff --git a/.werks/2460 b/.werks/2460
new file mode 100644
index 0000000..9653a91
--- /dev/null
+++ b/.werks/2460
@@ -0,0 +1,11 @@
+Title: Slightly more robust SNMP trap translation
+Level: 1
+Component: ec
+Compatible: compat
+Version: 1.2.7i3
+Date: 1436866882
+Class: fix
+
+SNMP traps having specific OIDs, like e.g. just ".1.3.6.1" were causing
+an exception when the Event Console tried to parse them. This has been
+changed to be more robust now.
diff --git a/ChangeLog b/ChangeLog
index a5f96c3..fa6ab99 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -91,6 +91,7 @@
Event Console:
* 2322 FIX: mkeventd: MIBs are now only loaded if SNMP Traps translation is activated...
+ * 2460 FIX: Slightly more robust SNMP trap translation...
HW/SW-Inventory:
* 2128 mk_inventory.vbs: inventory plugin for Windows now available as vbs script...
diff --git a/mkeventd/bin/mkeventd b/mkeventd/bin/mkeventd
index 6812da7..6ac5cc7 100755
--- a/mkeventd/bin/mkeventd
+++ b/mkeventd/bin/mkeventd
@@ -1224,7 +1224,10 @@ class EventServer:
mod, sym, indices = mib_var.getMibSymbol()
# Only care about the first indice reported. Why should we care about multiple?
# Do we have such cases here?
- translated_oid = '%s::%s.%s' % (mod, sym, indices[0].prettyPrint())
+ if not indices:
+ translated_oid = '%s::%s' % (mod, sym)
+ else:
+ translated_oid = '%s::%s.%s' % (mod, sym, indices[0].prettyPrint())
# This MACRO supports SYNTAX clause?
if hasattr(node, 'getSyntax'):