Module: check_mk
Branch: master
Commit: 98e3e3f6dfb9a71dbf03107b0c3e11a7901dbdaa
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=98e3e3f6dfb9a7…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Wed Jan 8 14:13:05 2014 +0100
FIX megaraid_bbu: Fix several false alarms and cases where inventory failed
---
.werks/441 | 10 ++++++++++
ChangeLog | 1 +
checks/megaraid_bbu | 19 ++++++++++++++-----
3 files changed, 25 insertions(+), 5 deletions(-)
diff --git a/.werks/441 b/.werks/441
new file mode 100644
index 0000000..1188e3c
--- /dev/null
+++ b/.werks/441
@@ -0,0 +1,10 @@
+Title: megaraid_bbu: Fix several false alarms and cases where inventory failed
+Level: 1
+Component: checks
+Class: fix
+State: unknown
+Version: 1.2.5i1
+Date: 1389186664
+Targetversion: future
+
+
diff --git a/ChangeLog b/ChangeLog
index a3ae771..b8c4f99 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -80,6 +80,7 @@
* 0439 FIX: postfix_mailq: Linux agent better detects Postfix installation...
* 0440 FIX: heartbeat_crm: Inventory more gracefully handles case where agent output is invalid...
* 0113 FIX: blade_blades: Now only make inventory for blades that are powered on...
+ * 0441 FIX: megaraid_bbu: Fix several false alarms and cases where inventory failed
* 0442 FIX: dell_om_disks: Treat global host spare disks as OK, instead of WARN...
* 0443 FIX: brocade_fcport: cope with firmware that does not provide speed information...
* 0322 FIX: timemachine: Check now also works if there are spaces in the name of the backup volume or the hostname
diff --git a/checks/megaraid_bbu b/checks/megaraid_bbu
index b7e097e..418e171 100644
--- a/checks/megaraid_bbu
+++ b/checks/megaraid_bbu
@@ -38,7 +38,7 @@ megaraid_bbu_refvalues = {
'Charging Status' : ('None', 1), # nolearn
'Battery State' : ('Operational', 2), # nolearn
'Learn Cycle Status' : ('OK', 1),
- 'Learn Cycle Active' : ('Yes', 0),
+ 'Learn Cycle Active' : ('No', 0),
'Battery Pack Missing' : ('No', 2),
'Battery Replacement required' : ('No', 1),
'Over Temperature' : ('No', 2),
@@ -49,9 +49,12 @@ megaraid_bbu_refvalues = {
def megaraid_bbu_parse(info):
controllers = {}
+ current_hba = None
for line in info:
- # Format the Agent output
- name, data = " ".join(line).split(":")
+ joined = " ".join(line)
+ if ":" not in joined:
+ continue # skip garbage lines
+ name, data = joined.split(":")
name = name.strip()
data = data.strip()
@@ -59,7 +62,7 @@ def megaraid_bbu_parse(info):
if name in [ "BBU status for Adapter", "BBU status for Adpater" ]:
current_hba = {}
controllers[data] = current_hba
- else:
+ elif current_hba != None:
# We lose the numerical temperature here
# (same key is used twice in output of megacli)
current_hba[name] = data
@@ -91,7 +94,13 @@ def check_megaraid_bbu(item, _no_params, info):
# to a false result. but people asked for it :>
try:
value = controller[varname]
- if value != refvalue:
+ # Some controllers report "Optimal" instead of "Operational"
+ if value == "Optimal":
+ pass
+ # Some controllers do not output Temperature: OK and Voltage: OK.
+ elif varname in [ "Temperature", "Voltage" ] and value[0].isdigit():
+ pass
+ elif value != refvalue:
text = '%s is %s' % (varname, value)
if refstate:
text += ' (%s)' % ("!" * refstate)
Module: check_mk
Branch: master
Commit: 3efc78a38566530fb602d34f50eb344f4628fae4
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=3efc78a3856653…
Author: Bernd Stroessenreuther <bs(a)mathias-kettner.de>
Date: Thu Jan 9 09:15:16 2014 +0100
FIX timemachine: Check now also works if there are spaces in the name of the backup volume or the hostname
---
.werks/322 | 8 ++++++++
ChangeLog | 1 +
checks/timemachine | 6 +++---
3 files changed, 12 insertions(+), 3 deletions(-)
diff --git a/.werks/322 b/.werks/322
new file mode 100644
index 0000000..699ed42
--- /dev/null
+++ b/.werks/322
@@ -0,0 +1,8 @@
+Title: timemachine: Check now also works if there are spaces in the name of the backup volume or the hostname
+Level: 1
+Component: checks
+Version: 1.2.5i1
+Date: 1389255252
+Class: fix
+
+
diff --git a/ChangeLog b/ChangeLog
index 97ef9ec..a3ae771 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -82,6 +82,7 @@
* 0113 FIX: blade_blades: Now only make inventory for blades that are powered on...
* 0442 FIX: dell_om_disks: Treat global host spare disks as OK, instead of WARN...
* 0443 FIX: brocade_fcport: cope with firmware that does not provide speed information...
+ * 0322 FIX: timemachine: Check now also works if there are spaces in the name of the backup volume or the hostname
Multisite:
* 0371 Added log class filter to hostsvcevents view
diff --git a/checks/timemachine b/checks/timemachine
index 8fb0b00..d77e3cb 100644
--- a/checks/timemachine
+++ b/checks/timemachine
@@ -40,13 +40,13 @@ def inventory_timemachine(info):
return [(None, backup_timemachine_default_levels)]
def check_timemachine(item, params, info):
- if len(info[0]) > 1:
- message = " ".join(info[0])
+ message = " ".join(info[0])
+ if not re.match('/Volumes/.+/[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]-[0-9][0-9][0-9][0-9][0-9][0-9]$', message):
return 2, "Backup seems to have failed, message was: %s" % message
warn, crit = params['age']
now = datetime.datetime.now()
- tokens = info[0][0].split("/")
+ tokens = message.split("/")
timestamp = tokens[-1]
state = 0
result = re.match('([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])-([0-9][0-9])([0-9][0-9])([0-9][0-9])', timestamp)
Module: check_mk
Branch: master
Commit: d65ed41dcd181ef91f67d7ae703ce018efcf15d1
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=d65ed41dcd181e…
Author: Bastian Kuhn <bk(a)mathias-kettner.de>
Date: Wed Jan 8 14:00:40 2014 +0100
FIX blade_blades: Now only make inventory for blades that are powered on
The inventory function now only find blades that are powered on instead just exsist.
This handels the case, that a blade is ready for production but still not in use.
---
.werks/113 | 11 +++++++++++
ChangeLog | 1 +
checkman/blade_blades | 2 +-
checks/blade_blades | 4 ++--
4 files changed, 15 insertions(+), 3 deletions(-)
diff --git a/.werks/113 b/.werks/113
new file mode 100644
index 0000000..3b8dd7e
--- /dev/null
+++ b/.werks/113
@@ -0,0 +1,11 @@
+Title: blade_blades: Now only make inventory for blades that are powered on
+Level: 1
+Component: checks
+Class: fix
+State: unknown
+Version: 1.2.5i1
+Date: 1389185906
+Targetversion: future
+
+The inventory function now only find blades that are powered on instead just exsist.
+This handels the case, that a blade is ready for production but still not in use.
diff --git a/ChangeLog b/ChangeLog
index 70a0e52..e0ae4a9 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -79,6 +79,7 @@
* 0251 FIX: agent_vsphere / check_mk agent: fixed outdated systemtime of check_mk agent...
* 0439 FIX: postfix_mailq: Linux agent better detects Postfix installation...
* 0440 FIX: heartbeat_crm: Inventory more gracefully handles case where agent output is invalid...
+ * 0113 FIX: blade_blades: Now only make inventory for blades that are powered on...
Multisite:
* 0371 Added log class filter to hostsvcevents view
diff --git a/checkman/blade_blades b/checkman/blade_blades
index aef942e..a2e5e2a 100644
--- a/checkman/blade_blades
+++ b/checkman/blade_blades
@@ -21,5 +21,5 @@ examples:
]
inventory:
- All blades in the system with the state 1 (present) are automatically
+ All blades that are powered on are automatically
inventorized.
diff --git a/checks/blade_blades b/checks/blade_blades
index f1f0e7c..6a79744 100644
--- a/checks/blade_blades
+++ b/checks/blade_blades
@@ -37,8 +37,8 @@ blade_blades_power_labels = ('off', 'on')
blade_blades_health_labels = ('unknown', 'good', 'warning', 'bad')
def inventory_blade_blades(info):
- # find only blades that are present
- return [ (line[0], '', line[1]) for line in info if line[1] == '1' ]
+ # find only blades that are powered on
+ return [ (line[0], '', line[1]) for line in info if line[2] == '1' ]
def check_blade_blades(item, params, info):
for line in info:
Module: check_mk
Branch: master
Commit: 8eb1a3e301b7ec4cde0d5474bda64434e7c4f971
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=8eb1a3e301b7ec…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Wed Jan 8 13:09:13 2014 +0100
FIX postfix_mailq: Linux agent better detects Postfix installation
We new check, if there is really Postfix installed, not just the user.
Also we handle the output of <tt>/usr/sbin/ssmpt</tt>. Thanks to Thomas
Schweikle.
---
.werks/439 | 12 ++++++++++++
ChangeLog | 1 +
agents/check_mk_agent.linux | 8 +++++---
3 files changed, 18 insertions(+), 3 deletions(-)
diff --git a/.werks/439 b/.werks/439
new file mode 100644
index 0000000..3ff379e
--- /dev/null
+++ b/.werks/439
@@ -0,0 +1,12 @@
+Title: postfix_mailq: Linux agent better detects Postfix installation
+Level: 1
+Component: checks
+Class: fix
+State: unknown
+Version: 1.2.5i1
+Date: 1389182878
+Targetversion: future
+
+We new check, if there is really Postfix installed, not just the user.
+Also we handle the output of <tt>/usr/sbin/ssmpt</tt>. Thanks to Thomas
+Schweikle.
diff --git a/ChangeLog b/ChangeLog
index 4ccdf7a..82c992e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -77,6 +77,7 @@
* 0399 FIX: check_ftp: cleanup configuration via WATO, remove Hostname field...
* 0435 FIX: esx_vsphere_sensors: Fix garbled output in case of placeholder VMs...
* 0251 FIX: agent_vsphere / check_mk agent: fixed outdated systemtime of check_mk agent...
+ * 0439 FIX: postfix_mailq: Linux agent better detects Postfix installation...
Multisite:
* 0371 Added log class filter to hostsvcevents view
diff --git a/agents/check_mk_agent.linux b/agents/check_mk_agent.linux
index 1649568..25132f5 100755
--- a/agents/check_mk_agent.linux
+++ b/agents/check_mk_agent.linux
@@ -420,9 +420,11 @@ fi
# Only handle the last 6 lines (includes the summary line at the bottom and
# the last message in the queue. The last message is not used at the moment
# but it could be used to get the timestamp of the last message.
-if type mailq >/dev/null 2>&1 && getent passwd postfix >/dev/null 2>&1; then
- echo '<<<postfix_mailq>>>'
- mailq | tail -n 6
+if type mailq >/dev/null 2>&1 && [ -x /usr/sbin/postfix ] && getent passwd postfix >/dev/null 2>&1; then
+ echo '<<<postfix_mailq>>>'
+ mailq | tail -n 6
+elif [ -x /usr/sbin/ssmtp ] ; then
+ mailq 2>&1 | sed 's/^[^:]*: \(.*\)/\1/' | tail -n 6
fi
#Check status of qmail mailqueue
Module: check_mk
Branch: master
Commit: b27690fe3f0ded6fecbefd964ed44518c27e5b84
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=b27690fe3f0ded…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Wed Jan 8 11:40:28 2014 +0100
Fixed several description texts
---
web/htdocs/wato.py | 2 +-
web/plugins/userdb/ldap.py | 6 +++---
web/plugins/views/availability.py | 2 +-
web/plugins/views/painters.py | 2 +-
web/plugins/wato/check_mk_configuration.py | 6 +++---
web/plugins/wato/check_parameters.py | 4 ++--
6 files changed, 11 insertions(+), 11 deletions(-)
diff --git a/web/htdocs/wato.py b/web/htdocs/wato.py
index 28fadd3..33fa821 100644
--- a/web/htdocs/wato.py
+++ b/web/htdocs/wato.py
@@ -14810,7 +14810,7 @@ def is_alias_used(my_group, my_name, aliasname):
for groupname, group in all_groups.items():
for key, value in group.items():
if value == aliasname and (my_group != groupname or my_name != key):
- return False, _("This alias is already used in the %s group %s .") % (groupname, key)
+ return False, _("This alias is already used in the %s group %s.") % (groupname, key)
# Timeperiods
timeperiods = load_timeperiods()
diff --git a/web/plugins/userdb/ldap.py b/web/plugins/userdb/ldap.py
index 9af7443..27a6a64 100644
--- a/web/plugins/userdb/ldap.py
+++ b/web/plugins/userdb/ldap.py
@@ -800,8 +800,8 @@ ldap_attribute_plugins['auth_expire'] = {
ldap_attribute_plugins['pager'] = {
'title': _('Pager'),
- 'help': _('This plugin synchronizes a field of the users ldap account to the pager attribute '
- 'of the WATO user accounts, which is then forwarded to Nagios and can be used'
+ 'help': _('This plugin synchronizes a field of the users LDAP account to the pager attribute '
+ 'of the WATO user accounts, which is then forwarded to the monitoring core and can be used'
'for notifications. By default the LDAP attribute <tt>mobile</tt> is used.'),
'needed_attributes': lambda params: [ params.get('attr', ldap_attr('mobile')) ],
'convert': lambda plugin, params, user_id, ldap_user, user: \
@@ -831,7 +831,7 @@ def register_user_attribute_sync_plugins():
'parameters': [
('attr', TextAscii(
title = _("LDAP attribute to sync"),
- help = _("The LDAP attribute which contents shal be synced into this custom attribute."),
+ help = _("The LDAP attribute whose contents shall be synced into this custom attribute."),
default_value = lambda: ldap_attr(attr),
)),
],
diff --git a/web/plugins/views/availability.py b/web/plugins/views/availability.py
index 1176517..cad0c2d 100644
--- a/web/plugins/views/availability.py
+++ b/web/plugins/views/availability.py
@@ -354,7 +354,7 @@ avoption_entries = [
( "short_intervals",
"single",
Integer(
- title = _("Short Time Intervalls"),
+ title = _("Short Time Intervals"),
minvalue = 0,
unit = _("sec"),
label = _("Ignore intervals shorter or equal"),
diff --git a/web/plugins/views/painters.py b/web/plugins/views/painters.py
index 18f1165..3f28e1d 100644
--- a/web/plugins/views/painters.py
+++ b/web/plugins/views/painters.py
@@ -484,7 +484,7 @@ multisite_painters["service_description"] = {
}
multisite_painters["service_display_name"] = {
- "title" : _("Service alternative dislay name"),
+ "title" : _("Service alternative display name"),
"short" : _("Display name"),
"columns" : ["service_display_name"],
"paint" : lambda row: (None, row["service_display_name"]),
diff --git a/web/plugins/wato/check_mk_configuration.py b/web/plugins/wato/check_mk_configuration.py
index e0bed14..4dd0e20 100644
--- a/web/plugins/wato/check_mk_configuration.py
+++ b/web/plugins/wato/check_mk_configuration.py
@@ -733,7 +733,7 @@ register_configvar(group,
("scope", DropdownChoice(
title = _("Search Scope"),
help = _("Scope to be used in group related LDAP searches. In most cases "
- "<tt>Search whole subtree below the base DN</tt> "
+ "<i>Search whole subtree below the base DN</i> "
"is the best choice. It searches for matching objects in the given base "
"recursively."),
choices = [
@@ -747,8 +747,8 @@ register_configvar(group,
title = _("Search Filter"),
help = _("Using this option you can define an optional LDAP filter which is used "
"during group related LDAP searches. It can be used to only handle a "
- "subset of the groups below the given base DN.<br><br> "
- "e. g. <tt>(objectclass=group)</tt>"),
+ "subset of the groups below the given base DN.<br><br>"
+ "e.g. <tt>(objectclass=group)</tt>"),
size = 80,
default_value = lambda: userdb.ldap_filter('groups', False),
attrencode = True,
diff --git a/web/plugins/wato/check_parameters.py b/web/plugins/wato/check_parameters.py
index bf522e2..e43c7ba 100644
--- a/web/plugins/wato/check_parameters.py
+++ b/web/plugins/wato/check_parameters.py
@@ -2444,7 +2444,7 @@ register_check_parameters(
register_check_parameters(
subgroup_applications,
"veeam_backup",
- _("Veeam Time since last Backup"),
+ _("Veeam: Time since last Backup"),
Dictionary(
elements = [
("age",
@@ -3456,7 +3456,7 @@ register_check_parameters(
),
( "upper",
Tuple(
- help = _("Upper levels for the FAN speed of a hardware device"),
+ help = _("Upper levels for the Fan speed of a hardware device"),
title = _("Upper levels"),
elements = [
Integer(title = _("warning if above"), unit = u"rpm", default_value = 8000),
Module: check_mk
Branch: master
Commit: 807736b81b49fc45a7cd6df66de7e8383d12a47a
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=807736b81b49fc…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Wed Jan 8 10:46:28 2014 +0100
Implemented role permissions for dashboards
Access to dashboards can now be controlled via role permissions. By
default all roles are permitted to acces all dashboards (like in
previous versions). You can now change access to the dashboards per
role.
---
.werks/429 | 11 +++++++++++
ChangeLog | 1 +
web/htdocs/dashboard.py | 20 ++++++++++++++++----
web/plugins/sidebar/shipped.py | 2 +-
4 files changed, 29 insertions(+), 5 deletions(-)
diff --git a/.werks/429 b/.werks/429
new file mode 100644
index 0000000..a9baccb
--- /dev/null
+++ b/.werks/429
@@ -0,0 +1,11 @@
+Title: Implemented role permissions for dashboards
+Level: 2
+Component: multisite
+Version: 1.2.5i1
+Date: 1389174300
+Class: feature
+
+Access to dashboards can now be controlled via role permissions. By
+default all roles are permitted to acces all dashboards (like in
+previous versions). You can now change access to the dashboards per
+role.
diff --git a/ChangeLog b/ChangeLog
index af1d911..3b1bad0 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -83,6 +83,7 @@
* 0390 Added an icon selector to the view editor...
* 0391 Added sorter / filter for host/service service levels...
* 0247 New mkp package for web applications: iNag / nagstatus / nagios status.dat...
+ * 0429 Implemented role permissions for dashboards...
* 0302 FIX: Fixed highlight of choosen elements in foldertee/views snapin in Chrome/IE
* 0239 FIX: Fixed incorrect html formatting when displaying host or service comments...
* 0307 FIX: Increased performance of multisite GUI with a large userbase...
diff --git a/web/htdocs/dashboard.py b/web/htdocs/dashboard.py
index 9a8670e..34e1c77 100644
--- a/web/htdocs/dashboard.py
+++ b/web/htdocs/dashboard.py
@@ -61,10 +61,6 @@ def load_plugins():
if loaded_with_language == current_language:
return
- # Permissions are currently not being defined. That will be the
- # case as soon as dashboards become editable.
-
-
# Load plugins for dashboards. Currently these files
# just may add custom dashboards by adding to builtin_dashboards.
load_web_plugins("dashboard", globals())
@@ -80,6 +76,20 @@ def load_plugins():
global dashboards
dashboards = builtin_dashboards
+ # Declare permissions for all dashboards
+ config.declare_permission_section("dashboard", _("Dashboards"))
+ for name, dashboard in dashboards.items():
+ config.declare_permission("dashboard.%s" % name,
+ dashboard["title"],
+ dashboard.get("description", ''),
+ config.builtin_role_ids)
+
+def permitted_dashboards():
+ return [ (name, dashboard) for name, dashboard
+ in dashboards.items()
+ if config.may("dashboard.%s" % name)
+ ]
+
# HTML page handler for generating the (a) dashboard. The name
# of the dashboard to render is given in the HTML variable 'name'.
# This defaults to "main".
@@ -87,6 +97,8 @@ def page_dashboard():
name = html.var("name", "main")
if name not in dashboards:
raise MKGeneralException("No such dashboard: '<b>%s</b>'" % name)
+ if not config.may("dashboard.%s" % name):
+ raise MKAuthException(_("You are not allowed to access this dashboard."))
render_dashboard(name)
diff --git a/web/plugins/sidebar/shipped.py b/web/plugins/sidebar/shipped.py
index 89009e7..f7b047e 100644
--- a/web/plugins/sidebar/shipped.py
+++ b/web/plugins/sidebar/shipped.py
@@ -77,7 +77,7 @@ def views_by_topic():
# Add all the dashboards to the views list
s += [ (_('Dashboards'), d['title'] and d['title'] or d_name, d_name)
for d_name, d
- in dashboard.dashboards.items()
+ in dashboard.permitted_dashboards()
]
s.sort()