Module: check_mk
Branch: master
Commit: 4d72f1b76c89ace253cf683b23db635696f5337a
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=4d72f1b76c89ac…
Author: Andreas Boesl <ab(a)mathias-kettner.de>
Date: Thu Jan 9 11:25:11 2014 +0100
FIX windows agent: fixed crash on processing eventlog records
On some instances the check_mk_agent crashed when formatting
eventlog messages. This was caused by message templates, which were
specified in dll files, expecting more formatting arguments than the
eventlog record provided.
---
.werks/253 | 11 +++++++++++
ChangeLog | 1 +
agents/windows/check_mk_agent.cc | 20 +++++++++++++-------
3 files changed, 25 insertions(+), 7 deletions(-)
diff --git a/.werks/253 b/.werks/253
new file mode 100644
index 0000000..a647cc6
--- /dev/null
+++ b/.werks/253
@@ -0,0 +1,11 @@
+Title: windows agent: fixed crash on processing eventlog records
+Level: 1
+Component: checks
+Version: 1.2.5i1
+Date: 1389262775
+Class: fix
+
+On some instances the check_mk_agent crashed when formatting
+eventlog messages. This was caused by message templates, which were
+specified in dll files, expecting more formatting arguments than the
+eventlog record provided.
diff --git a/ChangeLog b/ChangeLog
index b8c4f99..bc1eb0e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -84,6 +84,7 @@
* 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
+ * 0253 FIX: windows agent: fixed crash on processing eventlog records...
Multisite:
* 0371 Added log class filter to hostsvcevents view
diff --git a/agents/windows/check_mk_agent.cc b/agents/windows/check_mk_agent.cc
index 34cafea..b555fdb 100755
--- a/agents/windows/check_mk_agent.cc
+++ b/agents/windows/check_mk_agent.cc
@@ -1199,12 +1199,18 @@ void process_eventlog_entries(SOCKET &out, const char *logname, char *buffer,
DWORD num_strings = event->NumStrings;
WCHAR *s = (WCHAR *)(((char *)event) + event->StringOffset);
unsigned ns;
- for (ns = 0; ns < num_strings; ns++) {
- if (ns >= 63) break;
- strings[ns] = s;
- s += wcslen(s) + 1;
+ for (ns = 0; ns < 63; ns++) {
+ if (ns < num_strings) {
+ strings[ns] = s;
+ s += wcslen(s) + 1;
+ }
+ else
+ // Sometimes the eventlog record does not provide
+ // enough strings for the message template. Causes crash...
+ // -> Fill the rest with 0 strings
+ strings[ns] = (WCHAR *)"";
}
- strings[ns] = 0; // end marker in array
+ strings[63] = 0; // end marker in array
// Windows eventlog entries refer to texts stored in a DLL >:-P
// We need to load this DLL. First we need to look up which
@@ -2901,8 +2907,8 @@ void open_crash_log()
// Threads are not allowed to access the crash_log
g_connectionlog_file = CreateFile(TEXT(g_connection_log),
- GENERIC_WRITE, // open for reading
- 0, // do not share
+ GENERIC_WRITE, // open for writing
+ FILE_SHARE_READ, // do not share
NULL, // no security
CREATE_ALWAYS, // existing file only
FILE_ATTRIBUTE_NORMAL, // normal file
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),