Module: check_mk
Branch: master
Commit: 807006b0cac641abdaf6970b10d0dccea050430a
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=807006b0cac641…
Author: Goetz Golla <gg(a)mathias-kettner.de>
Date: Mon Jul 21 10:46:48 2014 +0200
FIX windows_updates: agent plugin now always sends section header, even if no update information provided
This helps to get more meaningful error information when auto update is deactivated for a host previously
inventorized with the windows updates check.
---
.werks/638 | 9 +++++++++
ChangeLog | 1 +
agents/windows/plugins/windows_updates.vbs | 2 +-
3 files changed, 11 insertions(+), 1 deletion(-)
diff --git a/.werks/638 b/.werks/638
new file mode 100644
index 0000000..3c7e86e
--- /dev/null
+++ b/.werks/638
@@ -0,0 +1,9 @@
+Title: windows_updates: agent plugin now always sends section header, even if no update information provided
+Level: 2
+Component: checks
+Version: 1.2.5i5
+Date: 1405932135
+Class: fix
+
+This helps to get more meaningful error information when auto update is deactivated for a host previously
+inventorized with the windows updates check.
diff --git a/ChangeLog b/ChangeLog
index dda3d7b..55de699 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -57,6 +57,7 @@
* 0634 FIX: Max Bandwidth for PNP-Graphs of Interface checks corrected...
* 0635 FIX: fc_port: the check no longer inventorizes ports with administrative state of 'unknown' or 'offline'
* 0636 FIX: fc_port: do not inventorize if brocade fibre channel mib is also supported on the device...
+ * 0638 FIX: windows_updates: agent plugin now always sends section header, even if no update information provided...
Multisite:
* 1013 Sort host names naturally, e.g. foobar11 comes after foobar2...
diff --git a/agents/windows/plugins/windows_updates.vbs b/agents/windows/plugins/windows_updates.vbs
index 596fce4..ce04507 100644
--- a/agents/windows/plugins/windows_updates.vbs
+++ b/agents/windows/plugins/windows_updates.vbs
@@ -48,8 +48,8 @@ Set WSHShell = CreateObject("WScript.Shell")
Dim RebootTime
Dim RegPath
+WScript.Echo "<<<windows_updates>>>"
If CreateObject("Microsoft.Update.AutoUpdate").DetectNow <> 0 Then
- WScript.Echo "<<<windows_updates>>>"
WScript.Quit()
End If
Module: check_mk
Branch: master
Commit: bbf614673d5267ca88791a6690e64cbdc856b8c0
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=bbf614673d5267…
Author: Andreas Boesl <ab(a)mathias-kettner.de>
Date: Mon Jul 21 10:31:38 2014 +0200
FIX ad_replication.bat: does not return data if the server is no DC
---
.werks/1083 | 8 ++++++++
ChangeLog | 1 +
agents/windows/plugins/ad_replication.bat | 8 +++++---
3 files changed, 14 insertions(+), 3 deletions(-)
diff --git a/.werks/1083 b/.werks/1083
new file mode 100644
index 0000000..3fd5727
--- /dev/null
+++ b/.werks/1083
@@ -0,0 +1,8 @@
+Title: ad_replication.bat: does not return data if the server is no DC
+Level: 1
+Component: checks
+Version: 1.2.5i5
+Date: 1405931445
+Class: fix
+
+
diff --git a/ChangeLog b/ChangeLog
index dda3d7b..f49c69a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -57,6 +57,7 @@
* 0634 FIX: Max Bandwidth for PNP-Graphs of Interface checks corrected...
* 0635 FIX: fc_port: the check no longer inventorizes ports with administrative state of 'unknown' or 'offline'
* 0636 FIX: fc_port: do not inventorize if brocade fibre channel mib is also supported on the device...
+ * 1083 FIX: ad_replication.bat: does not return data if the server is no DC
Multisite:
* 1013 Sort host names naturally, e.g. foobar11 comes after foobar2...
diff --git a/agents/windows/plugins/ad_replication.bat b/agents/windows/plugins/ad_replication.bat
index c4ce3c4..af04d5f 100644
--- a/agents/windows/plugins/ad_replication.bat
+++ b/agents/windows/plugins/ad_replication.bat
@@ -9,11 +9,13 @@ REM * credentials which are not enough for this check.
REM *
REM * To solve this problem you can do e.g. the following:
REM *
-REM * - Change the account the service is being started with to a
+REM * - Change the account the service is being started with to a
REM * domain user account with enough permissions on the DC.
-REM *
+REM *
REM ***
echo ^<^<^<ad_replication^>^>^>
dsquery server | find /I "CN=%COMPUTERNAME%," > nul
-if ERRORLEVEL 0 repadmin /showrepl /csv
+if ERRORLEVEL 1 goto SERVER_NOT_IN_DC_LIST
+repadmin /showrepl /csv
+:SERVER_NOT_IN_DC_LIST
Module: check_mk
Branch: master
Commit: a730f5fa0620b278fe9a739db2b523036d8e920e
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=a730f5fa0620b2…
Author: Bernd Stroessenreuther <bs(a)mathias-kettner.de>
Date: Fri Jul 18 14:23:46 2014 +0200
qlogic_sanbox.temp: New Check for temperature sensors in QLogic SANbox Fibre Channel Switches
---
.werks/1000 | 8 +++
ChangeLog | 3 +-
checkman/qlogic_sanbox.temp | 22 +++++++
checks/qlogic_sanbox | 86 +++++++++++++++++++++++++
modules/catalog.py | 1 +
pnp-templates/check_mk-qlogic_sanbox.temp.php | 1 +
web/plugins/perfometer/check_mk.py | 1 +
7 files changed, 121 insertions(+), 1 deletion(-)
diff --git a/.werks/1000 b/.werks/1000
new file mode 100644
index 0000000..7bdeb7b
--- /dev/null
+++ b/.werks/1000
@@ -0,0 +1,8 @@
+Title: qlogic_sanbox.temp: New Check for temperature sensors in QLogic SANbox Fibre Channel Switches
+Level: 1
+Component: checks
+Version: 1.2.5i5
+Date: 1405686184
+Class: feature
+
+
diff --git a/ChangeLog b/ChangeLog
index 7789b6d..b7f8f89 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -29,8 +29,9 @@
* 0179 check_dns: It is now possible to use the local dns server in wato configuration...
* 1058 livedump-mail-fetch: Now supporting either quoted-printable or non encoded mails...
* 0180 sap: It is now possible to add multiple sap instances to the sap.cfg file...
- * 0637 jolokia_metrics.gc, jolokia_metrics.tp, jolokia_info: two new subchecks for the jolokia_metrics checks and better error handling for jolokia_info...
* 0181 citrix_sessions, citrix_serverload: New checks for Citrix Load (a Score calculated by citrix) and the number of sessions
+ * 0637 jolokia_metrics.gc, jolokia_metrics.tp, jolokia_info: two new subchecks for the jolokia_metrics checks and better error handling for jolokia_info...
+ * 1000 qlogic_sanbox.temp: New Check for temperature sensors in QLogic SANbox Fibre Channel Switches
* 0994 FIX: agent plugin smart: fixed syntax error
* 0989 FIX: logwatch.ec: Fix forwarding multiple messages via syslog/TCP...
* 0943 FIX: if.include: fixed incorrect traffic percentage values in the check output of if checks...
diff --git a/checkman/qlogic_sanbox.temp b/checkman/qlogic_sanbox.temp
new file mode 100644
index 0000000..a82d1c2
--- /dev/null
+++ b/checkman/qlogic_sanbox.temp
@@ -0,0 +1,22 @@
+title: QLogic SANbox Fibre Channel Switches: Temperatur Sensors
+agents: snmp
+catalog: hw/storagehw/qlogic
+license: GPL
+distribution: check_mk
+description:
+ Checks the temperature sensors in QLogic SANbox Fibre Channel Switches.
+
+ The current temperature in degree celsius is displayed.
+
+ The check returns {OK} if connUnitSensorStatus reports "ok", {WARN} on
+ "warning", {CRIT} on status "failed" and {UNKN} on every other.
+
+item:
+ The ID of the sensor taken from SNMP. It contains 3 numbers separated by
+ dots, e. g. 129.45.3
+
+perfdata:
+ Exactly one value: The temperature in degree celsius.
+
+inventory:
+ Creates one check for every temperature sensor found by SNMP.
diff --git a/checks/qlogic_sanbox b/checks/qlogic_sanbox
new file mode 100644
index 0000000..d71eba3
--- /dev/null
+++ b/checks/qlogic_sanbox
@@ -0,0 +1,86 @@
+#!/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.
+
+qlogic_sanbox_temp_status_map = [ "undefined", # 0
+ "unknown", # 1
+ "other", # 2
+ "ok", # 3
+ "warning", # 4
+ "failed", ] # 5
+
+def inventory_qlogic_sanbox_temp(info):
+ inventory = []
+ for sensor_name, sensor_status, sensor_message, sensor_type, \
+ sensor_characteristic, sensor_id in info:
+ sensor_id = sensor_id.replace("16.0.0.192.221.48.", "").replace(".0.0.0.0.0.0.0.0", "")
+ if sensor_type == "8" and sensor_characteristic == "3" and \
+ sensor_name != "Temperature Status":
+ inventory.append( (sensor_id, None) )
+ return inventory
+
+def check_qlogic_sanbox_temp(item, _no_params, info):
+ for sensor_name, sensor_status, sensor_message, sensor_type, \
+ sensor_characteristic, sensor_id in info:
+ sensor_id = sensor_id.replace("16.0.0.192.221.48.", "").replace(".0.0.0.0.0.0.0.0", "")
+ if sensor_id == item:
+ sensor_status = int(sensor_status)
+ if sensor_status < 0 or sensor_status >= len(qlogic_sanbox_temp_status_map):
+ sensor_status_descr = sensor_status
+ else:
+ sensor_status_descr = qlogic_sanbox_temp_status_map[int(sensor_status)]
+
+ if sensor_status == 3:
+ status = 0
+ elif sensor_status == 4:
+ status = 1
+ elif sensor_status == 5:
+ status = 2
+ else:
+ status = 3
+
+ if sensor_message.endswith(" degrees C"):
+ temp = int(sensor_message.replace(" degrees C", ""))
+ perfdata = [ ('temp', str(temp) + 'C') ]
+ else:
+ perfdata = []
+
+ return status, "Sensor %s is at %s and reports status %s" % \
+ (sensor_id, sensor_message, sensor_status_descr), perfdata
+ return 3, "No sensor %s found" % item
+
+check_info["qlogic_sanbox.temp"] = {
+ "check_function" : check_qlogic_sanbox_temp,
+ "inventory_function" : inventory_qlogic_sanbox_temp,
+ "service_description" : "Temperature Sensor %s",
+ "has_perfdata" : True,
+ "snmp_info" : (".1.3.6.1.3.94.1.8.1", [3, # connUnitSensorName
+ 4, # connUnitSensorStatus
+ 6, # connUnitSensorMessage
+ 7, # connUnitSensorType
+ 8, # connUnitSensorCharacteristic
+ OID_END]),
+ "snmp_scan_function" : lambda oid: oid(".1.3.6.1.2.1.1.2.0").startswith(".1.3.6.1.4.1.3873.1.14"),
+}
diff --git a/modules/catalog.py b/modules/catalog.py
index 376547e..6c5dcfb 100644
--- a/modules/catalog.py
+++ b/modules/catalog.py
@@ -53,6 +53,7 @@ manpage_catalog_titles = {
"netapp" : "NetApp",
"hitachi" : "Hitachi",
"emc" : "EMC",
+ "qlogic" : "QLogic",
"phone" : "Telephony",
"app" : "Applications",
diff --git a/pnp-templates/check_mk-qlogic_sanbox.temp.php b/pnp-templates/check_mk-qlogic_sanbox.temp.php
new file mode 120000
index 0000000..23897c1
--- /dev/null
+++ b/pnp-templates/check_mk-qlogic_sanbox.temp.php
@@ -0,0 +1 @@
+check_mk-hitachi_hnas_temp.php
\ No newline at end of file
diff --git a/web/plugins/perfometer/check_mk.py b/web/plugins/perfometer/check_mk.py
index ad428c7..25f76f6 100644
--- a/web/plugins/perfometer/check_mk.py
+++ b/web/plugins/perfometer/check_mk.py
@@ -338,6 +338,7 @@ perfometers["check_mk-wagner_titanus_topsense.temp"] = perfometer_temperature
perfometers["check_mk-enterasys_temp"] = perfometer_temperature
perfometers["check_mk-adva_fsp_temp"] = perfometer_temperature
perfometers["check_mk-allnet_ip_sensoric.temp"] = perfometer_temperature
+perfometers["check_mk-qlogic_sanbox.temp"] = perfometer_temperature
def perfometer_temperature_multi(row, check_command, perf_data):
display_value = -1
Module: check_mk
Branch: master
Commit: e81955100519450fff37433dc9b4607d944250b3
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=e8195510051945…
Author: Bastian Kuhn <bk(a)mathias-kettner.de>
Date: Thu Jul 17 16:43:39 2014 +0200
logwatch.groups: Now also works in precompailed mode
---
checks/logwatch | 33 +++++++++++++++++++++------------
1 file changed, 21 insertions(+), 12 deletions(-)
diff --git a/checks/logwatch b/checks/logwatch
index 4d8c12a..84b34af 100644
--- a/checks/logwatch
+++ b/checks/logwatch
@@ -256,10 +256,15 @@ precompile_params['logwatch'] = logwatch_precompile
# | |
# '----------------------------------------------------------------------'
-def logwatch_groups_of_logfile(filename):
+def logwatch_group_precompile( hostname, item, _unused):
+ return logwatch_precompile( hostname, item, None ), host_extra_conf( hostname, logwatch_groups )
+
+def logwatch_groups_of_logfile(filename, params=False):
import fnmatch
groups = []
- for line in host_extra_conf(g_hostname, logwatch_groups):
+ if not params:
+ params = host_extra_conf(g_hostname, logwatch_groups)
+ for line in params:
for group_name, pattern in line:
inclusion, exclusion = pattern
if fnmatch.fnmatch(filename, inclusion) \
@@ -273,11 +278,10 @@ def inventory_logwatch_groups(info):
inventory = []
for logfile in not_forwarded_logs:
groups = logwatch_groups_of_logfile(logfile)
- if groups:
- for group in groups:
- if group not in added_groups:
- added_groups.append(group)
- inventory.append((group, None ))
+ for group in groups:
+ if group not in added_groups:
+ added_groups.append(group)
+ inventory.append((group, None ))
return inventory
def check_logwatch_groups(item, params, info):
@@ -295,7 +299,7 @@ def check_logwatch_groups(item, params, info):
loglines.append(line)
if line.startswith('[[['):
logfile = line[3:-3]
- if item in logwatch_groups_of_logfile(logfile):
+ if item in logwatch_groups_of_logfile(logfile, params[1]):
found = True
logfile_found = True
else:
@@ -310,10 +314,10 @@ check_info['logwatch.groups'] = {
'service_description': "LOG %s",
'group': 'logwatch',
}
-precompile_params['logwatch.groups'] = logwatch_precompile
+precompile_params['logwatch.groups'] = logwatch_group_precompile
#.
-def check_logwatch_generic(item, params, loglines, found):
+def check_logwatch_generic(item, params, loglines, found, groups=False):
# Create directories, if neccessary
try:
logdir = logwatch_dir + "/" + g_hostname
@@ -375,9 +379,14 @@ def check_logwatch_generic(item, params, loglines, found):
# Get the patterns (either compile or reuse the precompiled ones)
# Check_MK creates an empty string if the precompile function has
# not been exectued yet. The precomile function creates an empty
- # list when no rules/patterns are defined.
+ # list when no rules/patterns are defined. In case of the logwatch.groups
+ # checks, params are a tuple with the normal logwatch parameters on the first
+ # and the grouping patterns on the second position
if params not in ('', None):
- patterns = params # patterns already precompiled
+ if groups:
+ patterns = params[0]
+ else:
+ patterns = params # patterns already precompiled
else:
patterns = logwatch_precompile(g_hostname, item, None)
Module: check_mk
Branch: master
Commit: 2ee633e3c961aa55df600bc2daa37e1f0f3e4875
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=2ee633e3c961aa…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Thu Jul 17 14:46:22 2014 +0200
FIX LDAP: Using configured user filter during login to prevent temporary created users
When a LDAP user that is not allowed to log in to multisite according to the
"LDAP User Settings" OU and filtering options tries to login with valid credentials
Multisite created a temporary user entry just to remove it later during the login
process. The user can not access Multisite, but an error message is shown and a
log entry in the WATO audit log is being created.
This has been changed that the initial credentials check takes the filters from
"LDAP User Settings" into account. Leaving all not permitted users with the message
"invalid credentials".
---
.werks/1059 | 16 ++++++++++++++++
ChangeLog | 1 +
web/plugins/userdb/ldap.py | 10 ++++++----
3 files changed, 23 insertions(+), 4 deletions(-)
diff --git a/.werks/1059 b/.werks/1059
new file mode 100644
index 0000000..de0303a
--- /dev/null
+++ b/.werks/1059
@@ -0,0 +1,16 @@
+Title: LDAP: Using configured user filter during login to prevent temporary created users
+Level: 1
+Component: multisite
+Version: 1.2.5i5
+Date: 1405600906
+Class: fix
+
+When a LDAP user that is not allowed to log in to multisite according to the
+"LDAP User Settings" OU and filtering options tries to login with valid credentials
+Multisite created a temporary user entry just to remove it later during the login
+process. The user can not access Multisite, but an error message is shown and a
+log entry in the WATO audit log is being created.
+
+This has been changed that the initial credentials check takes the filters from
+"LDAP User Settings" into account. Leaving all not permitted users with the message
+"invalid credentials".
diff --git a/ChangeLog b/ChangeLog
index fbfe2d5..3918954 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -62,6 +62,7 @@
* 0945 FIX: Sidebar snapin "Problem hosts": Now excludes hosts and services in downtime
* 1036 FIX: doc/treasures/downtime: fix --url option, better error output
* 1074 FIX: Fix Virtual Host Tree snapin...
+ * 1059 FIX: LDAP: Using configured user filter during login to prevent temporary created users...
WATO:
* 0825 WATO: Hover menu of user online state shows the last seen date/time now
diff --git a/web/plugins/userdb/ldap.py b/web/plugins/userdb/ldap.py
index 3627c55..3cf8883 100644
--- a/web/plugins/userdb/ldap.py
+++ b/web/plugins/userdb/ldap.py
@@ -468,12 +468,14 @@ def ldap_get_user(username, no_escape = False):
if username in g_ldap_user_cache:
return g_ldap_user_cache[username]
- # Check wether or not the user exists in the directory
- # It's only ok when exactly one entry is found.
- # Returns the DN and user_id as tuple in this case.
+ # Check wether or not the user exists in the directory matching the username AND
+ # the user search filter configured in the "LDAP User Settings".
+ # It's only ok when exactly one entry is found. Returns the DN and user_id
+ # as tuple in this case.
result = ldap_search(
ldap_replace_macros(config.ldap_userspec['dn']),
- '(%s=%s)' % (ldap_user_id_attr(), ldap.filter.escape_filter_chars(username)),
+ '(&(%s=%s)%s)' % (ldap_user_id_attr(), ldap.filter.escape_filter_chars(username),
+ config.ldap_userspec['filter']),
[ldap_user_id_attr()],
)