Module: check_mk
Branch: master
Commit: b748506e8972789b1acd06bcf3312fc6dbfce912
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=b748506e897278…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Wed Dec 11 10:01:27 2013 +0100
FIX apache_status: Improved handling of unexpeted data sent by agents
Now the check should also handle unexpected ascii responses from the agent.
---
.werks/310 | 8 ++++++++
ChangeLog | 1 +
checks/apache_status | 2 ++
3 files changed, 11 insertions(+)
diff --git a/.werks/310 b/.werks/310
new file mode 100644
index 0000000..f0b43e5
--- /dev/null
+++ b/.werks/310
@@ -0,0 +1,8 @@
+Title: apache_status: Improved handling of unexpeted data sent by agents
+Level: 1
+Component: checks
+Version: 1.2.3i8
+Date: 1386752436
+Class: fix
+
+Now the check should also handle unexpected ascii responses from the agent.
diff --git a/ChangeLog b/ChangeLog
index 8f7428a..3e38996 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -12,6 +12,7 @@
* 0305 FIX: apache_status: Fixed exception when agent reports HTML code as apache-status data...
* 0104 FIX: mssql: Server instances with underline in name are now supported....
* 0240 FIX: Virtualmachine names with space no longer have missing piggyback data...
+ * 0310 FIX: apache_status: Improved handling of unexpeted data sent by agents...
Multisite:
* 0302 FIX: Fixed highlight of choosen elements in foldertee/views snapin in Chrome/IE
diff --git a/checks/apache_status b/checks/apache_status
index 0c5e746..c9f545b 100644
--- a/checks/apache_status
+++ b/checks/apache_status
@@ -72,6 +72,8 @@ def apache_status_parse(info):
data = {}
for line in info:
address, port = line[:2]
+ if len(line) != 4:
+ continue # Skip unexpected lines
label = (' '.join(line[2:-1])).rstrip(':')
value = apache_status_fields[label][1](line[-1])
item = '%s:%s' % (address, port)
Module: check_mk
Branch: master
Commit: 09ab950226c905bd4ace5a69432c7c8ee53f7506
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=09ab950226c905…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Wed Dec 11 09:20:16 2013 +0100
FIX Trying to prevent read/write conflicts with a large user base
When having a large amount of users, it might happen, that the user
configuration files are read while they are written e.g. by an automated
LDAP sync or some other modification to the user database. With bad
timing, the file could be read while being incomplete which might result
in syntax errors or similar unexpected situations. This changes the way
the files are being written to a more save way.
---
.werks/309 | 13 +++++++++++++
ChangeLog | 1 +
web/htdocs/userdb.py | 9 ++++++---
3 files changed, 20 insertions(+), 3 deletions(-)
diff --git a/.werks/309 b/.werks/309
new file mode 100644
index 0000000..6803741
--- /dev/null
+++ b/.werks/309
@@ -0,0 +1,13 @@
+Title: Trying to prevent read/write conflicts with a large user base
+Level: 1
+Component: wato
+Version: 1.2.3i8
+Date: 1386749884
+Class: fix
+
+When having a large amount of users, it might happen, that the user
+configuration files are read while they are written e.g. by an automated
+LDAP sync or some other modification to the user database. With bad
+timing, the file could be read while being incomplete which might result
+in syntax errors or similar unexpected situations. This changes the way
+the files are being written to a more save way.
diff --git a/ChangeLog b/ChangeLog
index a8429ce..d23dc38 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -22,6 +22,7 @@
* 0057 FIX: Fix exception in WATO host editor on custom tag without topic...
* 0241 FIX: Improved sorting of WATO folders in dropdown menu...
* 0019 FIX: Fixed wording in WATO rule for MSSQL check
+ * 0309 FIX: Trying to prevent read/write conflicts with a large user base...
Reporting & Availability:
* 0018 New option for displaying a legend for the colors used in the timeline...
diff --git a/web/htdocs/userdb.py b/web/htdocs/userdb.py
index 43ad80b..55905d1 100644
--- a/web/htdocs/userdb.py
+++ b/web/htdocs/userdb.py
@@ -392,27 +392,29 @@ def save_users(profiles):
for p, val in profile.items()
if p in multisite_keys + multisite_attributes(profile.get('connector'))])
- filename = root_dir + "contacts.mk"
+ filename = root_dir + "contacts.mk.new"
# Check_MK's monitoring contacts
out = create_user_file(filename, "w")
out.write("# Written by Multisite UserDB\n# encoding: utf-8\n\n")
out.write("contacts.update(\n%s\n)\n" % pprint.pformat(contacts))
out.close()
+ os.rename(filename, filename[:-4])
# Users with passwords for Multisite
make_nagios_directory(multisite_dir)
- filename = multisite_dir + "users.mk"
+ filename = multisite_dir + "users.mk.new"
out = create_user_file(filename, "w")
out.write("# Written by Multisite UserDB\n# encoding: utf-8\n\n")
out.write("multisite_users = \\\n%s\n" % pprint.pformat(users))
out.close()
+ os.rename(filename, filename[:-4])
# Execute user connector save hooks
hook_save(profiles)
# Write out the users serials
- serials_file = '%s/auth.serials' % os.path.dirname(defaults.htpasswd_file)
+ serials_file = '%s/auth.serials.new' % os.path.dirname(defaults.htpasswd_file)
out = create_user_file(serials_file, "w")
def encode_utf8(value):
if type(value) == unicode:
@@ -422,6 +424,7 @@ def save_users(profiles):
for user_id, user in profiles.items():
out.write('%s:%d\n' % (encode_utf8(user_id), user.get('serial', 0)))
out.close()
+ os.rename(serials_file, serials_file[:-4])
# Write user specific files
for id, user in profiles.items():
Module: check_mk
Branch: master
Commit: d3c1a9f2abb4cbcb2143ed01fb5feace2218f951
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=d3c1a9f2abb4cb…
Author: Andreas Boesl <ab(a)mathias-kettner.de>
Date: Tue Dec 10 17:41:02 2013 +0100
FIX Parameters for clustered services can now be configured on the cluster host
The check parameters of a clustered service were taken from one of the clusters node.
Any parameters for the cluster got ignored.
This fix allows to configure the parameters of a clustered service on the cluster itself.
However, if the clustered service has no configured parameters, the parameters from the nodes
are used instead.
---
.werks/242 | 13 +++++++++++++
ChangeLog | 1 +
modules/check_mk.py | 3 ++-
3 files changed, 16 insertions(+), 1 deletion(-)
diff --git a/.werks/242 b/.werks/242
new file mode 100644
index 0000000..3c4cdb1
--- /dev/null
+++ b/.werks/242
@@ -0,0 +1,13 @@
+Title: Parameters for clustered services can now be configured on the cluster host
+Level: 1
+Component: wato
+Version: 1.2.3i8
+Date: 1386692048
+Class: fix
+
+The check parameters of a clustered service were taken from one of the clusters node.
+Any parameters for the cluster got ignored.
+
+This fix allows to configure the parameters of a clustered service on the cluster itself.
+However, if the clustered service has no configured parameters, the parameters from the nodes
+are used instead.
diff --git a/ChangeLog b/ChangeLog
index 8a6d57f..afd7c77 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -23,6 +23,7 @@
* 0057 FIX: Fix exception in WATO host editor on custom tag without topic...
* 0241 FIX: Improved sorting of WATO folders in dropdown menu...
* 0019 FIX: Fixed wording in WATO rule for MSSQL check
+ * 0242 FIX: Parameters for clustered services can now be configured on the cluster host...
Reporting & Availability:
* 0018 New option for displaying a legend for the colors used in the timeline...
diff --git a/modules/check_mk.py b/modules/check_mk.py
index 3d26e16..1b56352 100755
--- a/modules/check_mk.py
+++ b/modules/check_mk.py
@@ -1041,7 +1041,8 @@ def get_check_table(hostname, remove_duplicates=False):
for nodename, checkname, item, params in node_checks:
descr = service_description(checkname, item)
if hostname == host_of_clustered_service(node, descr):
- handle_entry((hostname, checkname, item, params))
+ cluster_params = compute_check_parameters(hostname, checkname, item, params)
+ handle_entry((hostname, checkname, item, cluster_params))
# Remove dependencies to non-existing services
Module: check_mk
Branch: master
Commit: 57f46d682234cff23dd505299abf328629af9276
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=57f46d682234cf…
Author: Götz Golla <gg(a)mathias-kettner.de>
Date: Tue Dec 10 16:39:46 2013 +0100
raritan_pdu_plugs: new check for Raritan PX-2000 family PDUs
This check monitors the state of the plugs of the Raritan PDUs
---
.werks/74 | 8 ++++
ChangeLog | 1 +
checkman/raritan_pdu_plugs | 20 ++++++++
checks/raritan_pdu_plugs | 85 ++++++++++++++++++++++++++++++++++
web/plugins/wato/check_parameters.py | 40 ++++++++++++++++
5 files changed, 154 insertions(+)
diff --git a/.werks/74 b/.werks/74
new file mode 100644
index 0000000..07300ad
--- /dev/null
+++ b/.werks/74
@@ -0,0 +1,8 @@
+Title: raritan_pdu_plugs: new check for Raritan PX-2000 family PDUs
+Level: 1
+Component: checks
+Version: 1.2.3i8
+Date: 1386689897
+Class: feature
+
+This check monitors the state of the plugs of the Raritan PDUs
diff --git a/ChangeLog b/ChangeLog
index a8429ce..8a6d57f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -5,6 +5,7 @@
* 0105 apc_humidity: New Check for humidity levels on APC Devices
* 0106 3ware_units: The verifying state is now handled as ok...
* 0086 timemachine: new check checking the age of latest backup by timemachine on MAC OS
+ * 0074 raritan_pdu_plugs: new check for Raritan PX-2000 family PDUs...
* 0103 FIX: services: Fixed bug with service inventory defined in main.mk...
* 0299 FIX: borcade_mlx_fan: Prettified output, handling "other" state now
* 0300 FIX: cisco_fru_power: Trying not to inventorize not plugged in FRUs...
diff --git a/checkman/raritan_pdu_plugs b/checkman/raritan_pdu_plugs
new file mode 100644
index 0000000..f7268c2
--- /dev/null
+++ b/checkman/raritan_pdu_plugs
@@ -0,0 +1,20 @@
+title: Raritan PX-2000 family PDU plug state
+agents: snmp
+catalog: hw/other
+license: GPL
+distribution: check_mk
+description:
+ This check monitors the state of the plugs of the Raritan PX-2000
+ family of intelligent rack power distribution units (iPDUs).
+ It has been tested with the model PX2-2180CR.
+ As default plugs which are switched {on} are in the state {OK},
+ other states are in the state {CRIT}.
+ The required state can be configured to {off}. Then these plugs are in
+ the state {OK} when they are switched off, and {CRIT} otherwise.
+
+item:
+ The ID Number of the plug as given by the device
+
+inventory:
+ One service per plug will be created
+
diff --git a/checks/raritan_pdu_plugs b/checks/raritan_pdu_plugs
new file mode 100644
index 0000000..8b7145b
--- /dev/null
+++ b/checks/raritan_pdu_plugs
@@ -0,0 +1,85 @@
+#!/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.
+
+raritan_pdu_plugs_default = '"on"'
+
+def inventory_raritan_pdu_plugs(info):
+ inventory = []
+ for line in info:
+ if saveint(line[0]) != 0:
+ inventory.append((line[0], raritan_pdu_plugs_default) )
+ return inventory
+
+def check_raritan_pdu_plugs(item, params, info):
+ required_state = params
+ states = {
+ -1 : "unavailable",
+ 0 : "open",
+ 1 : "closed",
+ 2 : "belowLowerCritical",
+ 3 : "belowLowerWarning",
+ 4 : "normal",
+ 5 : "aboveUpperWarning",
+ 6 : "aboveUpperCritical",
+ 7 : "on",
+ 8 : "off",
+ 9 : "detected",
+ 10: "notDetected",
+ 11: "alarmed",
+ }
+ state = 3
+ message = "Sensor not found"
+
+ for line in info:
+ if line[0] == item:
+ outletLabel = line[0] # Outlet-Label (Index) (PDU identifier of the outlet)
+ outletName = line[1] # OutletName (vergebene Bezeichnung für den Ausgang)
+ outletState = int(line[2]) # The Outlet state at present (sh. outlet_state_info)
+
+ if states[outletState] == required_state:
+ state = 0
+ else:
+ state = 2
+
+ message = outletName + ": " + states[outletState]
+
+ return (state, message)
+
+check_info['raritan_pdu_plugs'] = {
+ "inventory_function" : inventory_raritan_pdu_plugs,
+ "check_function" : check_raritan_pdu_plugs,
+ "service_description" : "Plug %s",
+ "group" : "plugs",
+ "has_perfdata" : False,
+ "snmp_info" : (".1.3.6.1.4.1.13742.6", [
+ "3.5.3.1.2", # Outlet-Label (Index) (PDU identifier of the outlet)
+ "3.5.3.1.3", # OutletName (eigene vergebene Bezeichnung für den Ausgang)
+ "4.1.2.1.3", # Outlet state at present (sh.o. outlet_state_info im check)
+ ]),
+ "snmp_scan_function" : lambda oid: \
+ oid(".1.3.6.1.4.1.13742.6.3.2.1.1.3.1").startswith("PX2-2")
+
+}
diff --git a/web/plugins/wato/check_parameters.py b/web/plugins/wato/check_parameters.py
index 914ce58..f6c35b1 100644
--- a/web/plugins/wato/check_parameters.py
+++ b/web/plugins/wato/check_parameters.py
@@ -3242,6 +3242,26 @@ register_check_parameters(
register_check_parameters(
subgroup_environment,
+ "plugs",
+ _("State of PDU Plugs"),
+ DropdownChoice(
+ help = _("This rule sets the required state of a PDU plug. It is meant to "
+ "be independent of the hardware manufacturer."),
+ title = _("Required plug state"),
+ choices = [
+ ( "on", "Plug is ON" ),
+ ( "off", "Plug is OFF" ),
+ ],
+ default_value = "on"
+ ),
+ TextAscii(
+ title = _("Plug Item ID number"),
+ allow_empty = True),
+ None
+)
+
+register_check_parameters(
+ subgroup_environment,
"room_temperature",
_("Room temperature (external thermal sensors)"),
Tuple(
@@ -4138,6 +4158,26 @@ register_check_parameters(
"first"
)
+register_check_parameters(
+ subgroup_applications,
+ "windows_updates",
+ _("WSUS"),
+ Tuple(
+ title = _("Parameters for the Windows Update Check with WSUS"),
+ elements = [
+ Integer(title = _("Warning level for important updates")),
+ Integer(title = _("Critical level for important updates")),
+ Integer(title = _("Warning level for optional updates")),
+ Integer(title = _("Critical level for optional updates")),
+ Age(title = _("Warning level for time until forced reboot"), default_value = 604800),
+ Age(title = _("Critical level for time until forced reboot"), default_value = 172800),
+ Checkbox(title = _("display all important updates verbosely"), default_value = True),
+ ],
+ ),
+ None,
+ "first"
+)
+
register_check_parameters(subgroup_applications,
"logwatch_ec",
_('Logwatch Event Console Forwarding'),
Module: check_mk
Branch: master
Commit: 72ae1c9e6ae5b7683d43bfbb9e3fa5b5a83aac41
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=72ae1c9e6ae5b7…
Author: Götz Golla <gg(a)mathias-kettner.de>
Date: Tue Dec 10 16:15:53 2013 +0100
Help text for regular expression usage fixed
---
web/htdocs/wato.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/web/htdocs/wato.py b/web/htdocs/wato.py
index b859558..c08715d 100644
--- a/web/htdocs/wato.py
+++ b/web/htdocs/wato.py
@@ -12341,7 +12341,7 @@ def HostnameTranslation(**kwargs):
help = _("Please specify a regular expression in the first field. This expression should at "
"least contain one subexpression exclosed in brackets - for example <tt>vm_(.*)_prod</tt>. "
"In the second field you specify the translated host name and can refer to the first matched "
- "group with <tt>\1</tt>, the second with <tt>\2</tt> and so on, for example <tt>\1.example.org</tt>"),
+ "group with <tt>\\1</tt>, the second with <tt>\\2</tt> and so on, for example <tt>\\1.example.org</tt>"),
elements = [
RegExpUnicode(
title = _("Regular expression"),
Module: check_mk
Branch: master
Commit: 4ebe1e4c8b4cbcc6dfc1366a62df6287ccba44cf
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=4ebe1e4c8b4cbc…
Author: Götz Golla <gg(a)mathias-kettner.de>
Date: Tue Dec 10 16:12:24 2013 +0100
minor changes to werk titles
---
.werks/61 | 2 +-
.werks/64 | 2 +-
.werks/67 | 4 ++--
3 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/.werks/61 b/.werks/61
index 45950e5..bae11f6 100644
--- a/.werks/61
+++ b/.werks/61
@@ -5,5 +5,5 @@ Version: 1.2.3i7
Date: 1383564852
Class: feature
-Cisco has depreceated the object named cpmCPUTotal5min by cpmCPUTotal5minRev.
+Cisco has depreceated the snmp object named cpmCPUTotal5min by cpmCPUTotal5minRev.
Both objects are now recognized by the check, with priority to cpmCPUTotal5minRev.
diff --git a/.werks/64 b/.werks/64
index cd4929c..f669e1c 100644
--- a/.werks/64
+++ b/.werks/64
@@ -1,4 +1,4 @@
-Title: veeam_jobs: new check to monitor the backup jobs of the veeam backup tool
+Title: veeam_jobs: new check to monitor the backup jobs of the Veeam backup tool
Level: 1
Component: checks
Version: 1.2.3i7
diff --git a/.werks/67 b/.werks/67
index a8bd992..882eee6 100644
--- a/.werks/67
+++ b/.werks/67
@@ -5,5 +5,5 @@ Version: 1.2.3i7
Date: 1384184962
Class: feature
-livedump now has an option to mark the mode of the dump (config or status) in the first
-line of the dump to be read by the livedump receiver livedump-ssh-recv
+livedump now has an option to mark the mode of the dump (config or status) in the first
+line of the dump. This mark can then be read by the livedump receiver livedump-ssh-recv.
Module: check_mk
Branch: master
Commit: 0e5a6bc8de6b2a79adf1a9ad05b4d5f93347d427
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=0e5a6bc8de6b2a…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Tue Dec 10 15:49:36 2013 +0100
Updated bug entries #2096
---
.bugs/2096 | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/.bugs/2096 b/.bugs/2096
new file mode 100644
index 0000000..88d5428
--- /dev/null
+++ b/.bugs/2096
@@ -0,0 +1,14 @@
+Title: Activate Changes on Global Settings page: confusing for mkeventd settings
+Component: wato
+State: open
+Date: 2013-12-10 15:47:14
+Targetversion: 1.2.3i6
+Class: nastiness
+
+When changing mkeventd related options via global settings dialog, the dialog does not show
+the activate changes button. But the changes are only applied when switching the page to
+event rule configuration page, clicking on the activate changes button there and then
+activating the changes. This is very unfriendly.
+
+This should be changed! maybe this way: Add multiple possible "activate changes" buttons,
+one for the general settings and one for the mkeventd.