Module: check_mk
Branch: master
Commit: afa862395285c9c206279fefca3e9c482cfcc7fa
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=afa862395285c9…
Author: Andreas Boesl <ab(a)mathias-kettner.de>
Date: Mon Oct 27 16:38:01 2014 +0100
reformatted werk 1422
---
.werks/1422 | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/.werks/1422 b/.werks/1422
index 8c4bd3d..f20ef0b 100644
--- a/.werks/1422
+++ b/.werks/1422
@@ -6,13 +6,13 @@ Version: 1.2.5i6
Date: 1413821252
Class: feature
-Previously the virtual machines and hosts power states were always assigned to the queried vCenter or host system.<br>
-You can now configure via WATO rule <tt>Check state of VMWare ESX via vSphere</tt> that this information is piggybacked
-'down' to the esx hosts or the virtual machines.<br>
-
-With this new feature a virtual machine may also have the following informations<br>
-<tt>ESX Hostsystem OK - Running on esx.mathias-kettner.de</tt><br>
-<tt>VM LinuxIII OK - power state: poweredOn, running on [esx.mathias-kettner.de]</tt>
-
+Previously the virtual machines and hosts power states were always assigned to the queried vCenter or host system.
+You can now configure via WATO rule <i>Check state of VMWare ESX via vSphere</i> that this information is piggybacked
+'down' to the esx hosts or the virtual machines.
+With this new feature a virtual machine may also have the following informations
+C+:
+ESX Hostsystem OK - Running on esx.mathias-kettner.de
+VM LinuxIII OK - power state: poweredOn, running on [esx.mathias-kettner.de]
+C-:
Module: check_mk
Branch: master
Commit: ee4ef64da49b697d767bae8a47b490be52a373c0
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=ee4ef64da49b69…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Mon Oct 27 16:10:46 2014 +0100
Updated formatting of Werk #1425, yet again
---
.werks/1425 | 24 +++++++++++++-----------
1 file changed, 13 insertions(+), 11 deletions(-)
diff --git a/.werks/1425 b/.werks/1425
index 901afa2..ad812c8 100644
--- a/.werks/1425
+++ b/.werks/1425
@@ -1,6 +1,6 @@
-Title: New section header option "encoding"
+Title: New section header option "encoding" for agent output
Level: 1
-Component: checks
+Component: core
Compatible: compat
Version: 1.2.5i6
Date: 1414421080
@@ -10,15 +10,17 @@ If you write your own check plugins you might know that a section
header can contain additional options separated by a colon.
For example:
+For section headers of agent outputs an additional option <tt>encoding</tt>
+has been introduced. Generally all check plugins should output valid UTF-8
+encoded text. In some instances this is not possible, because the plugin
+itself has its own hardcoded encoding. With the encoding option you can
+specify the encoding for this entire section. Check_MK will then decode the
+given section output and recode it into UTF-8 for further processing.
+Example:
+
F+:
-<<<lnx_distro:sep(124):persist(141442125)>>>
+<<<win_foobar:encoding(cp1252)>>>
F-:
-An additional option <tt>encoding</tt> has been introduced.
-Generally all check plugins should output valid utf-8 encoded text.
-In some instances this is not possible, because the plugin itself
-has its own hardcoded encoding. With the encoding option you can specify
-the encoding for this entire section.
-
-Check_MK will decode the given section output and recode it into utf-8 for
-further processing.
+You find a list of all available encoding
+<a href="https://docs.python.org/2.4/lib/standard-encodings.html">here</a>.
Module: check_mk
Branch: master
Commit: 86e8a3bdfc99ea625a222e2635ddba4ed3c85a04
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=86e8a3bdfc99ea…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Mon Oct 27 16:23:39 2014 +0100
Updated formatting of several werks
---
.werks/1085 | 8 ++++----
.werks/1122 | 12 ++++++------
.werks/1125 | 7 ++++---
.werks/1424 | 10 +++++-----
.werks/266 | 8 ++++++--
ChangeLog | 6 +++---
6 files changed, 28 insertions(+), 23 deletions(-)
diff --git a/.werks/1085 b/.werks/1085
index c64a3b6..30e0148 100644
--- a/.werks/1085
+++ b/.werks/1085
@@ -5,13 +5,13 @@ Version: 1.2.5i5
Date: 1405937822
Class: feature
-When a quicksearch pattern matched multiple hosts the view <tt>hosts</tt> was shown.
+When a Quicksearch pattern matched multiple hosts the view <i>All hosts</i> was shown.
This view displayed all services for these hosts, which could lead to plenty of (unwanted) output in the view.
-The quicksearch feature has been changed in the following way<br>
+The quicksearch feature has been changed in the following way:
<ul>
-<li>If there are multiple host matches the <tt>searchhost</tt> view is displayed</li>
-<li>If there is a single match the <tt>hosts</tt> view is displayed (this view also contains the services)</li>
+<li>If there are multiple host matches the <i>Search Host</i> view is displayed</li>
+<li>If there is a single match the <i>Host</i> view is displayed (this view also contains the services)</li>
</ul>
Note: This also applies to special search patterns like <tt>h:localhost h:otherhost</tt>
diff --git a/.werks/1122 b/.werks/1122
index 6af8f38..6bb4c7d 100644
--- a/.werks/1122
+++ b/.werks/1122
@@ -6,18 +6,18 @@ Version: 1.2.5i6
Date: 1412178359
Class: fix
-There were instances where a logline was not fully written to a unicode file.
+There were instances where a logline was not fully written to a UTF-16 (unicode) encoded file.
+For example:
-For example
-C+:
+F+:C:\some\log\file.log
This is the first line
This is the sec
-C-:
+F-:
In this scenario the agent is not allowed to parse the second line, because
it has not been fully written to disk yet. A complete line is considered to
-be finished with a carriage return followed by a newline.<br><br>
+be finished with a carriage return followed by a newline.
With this update the agent now stops parsing after the first line and
continues at the start of the second line on the following agent query.
-Note: This only applies to utf-8 files
+Note: This only applies to UTF-16 encoded files.
diff --git a/.werks/1125 b/.werks/1125
index 05e6dc2..eb68da9 100644
--- a/.werks/1125
+++ b/.werks/1125
@@ -1,4 +1,4 @@
-Title: EC actions couldn't get saved when a EC rule had "Send monitoring notification" set
+Title: EC actions are now saved when an EC rule has "Send monitoring notification" set
Level: 1
Component: ec
Compatible: compat
@@ -6,5 +6,6 @@ Version: 1.2.5i6
Date: 1412933594
Class: fix
-This lead to the warning<br>
-<tt>You are missing the action with the ID @NOTIFY which is still used in some rules</tt>
+This fixes a bug where actions where not saved. This lead to the warning
+<i>You are missing the action with the ID @NOTIFY which is still used in
+some rules</i>.
diff --git a/.werks/1424 b/.werks/1424
index 210763e..c1ccde2 100644
--- a/.werks/1424
+++ b/.werks/1424
@@ -1,12 +1,12 @@
Title: mknotifyd: now able to check if its still listening for telegrams
Level: 1
-Component: checks
+Component: notifications
Compatible: compat
Version: 1.2.5i6
Date: 1414413785
Class: feature
-The mknotifyd server is now able to handle heartbeat telegrams.<br>
-Just send an empty pickled python object to the server, like "N." (a pickled None)<br>
-The mknotifyd will answer with an "OK".<br>
-You can monitor this behaviour with the active check "Check connecting to a TCP port".
+The mknotifyd server is now able to handle heartbeat telegrams.
+Just send an empty pickled python object to the server, like "N." (a pickled <tt>None</tt>)
+The mknotifyd will answer with an "OK".
+You can monitor this behaviour with the active check <i>Check connecting to a TCP port</i>.
diff --git a/.werks/266 b/.werks/266
index 61deff5..aa9fe51 100644
--- a/.werks/266
+++ b/.werks/266
@@ -1,4 +1,4 @@
-Title: windows_agent: now supports mrpe include files
+Title: windows_agent: now supports MRPE include files
Level: 1
Component: checks
Version: 1.2.5i1
@@ -17,10 +17,12 @@ F+:check_mk.ini
check = Dummy mrpe\check_crit
check = IP_Configuration mrpe\check_ipconfig 1.2.3.4
check = Whatever c:\myplugins\check_whatever -w 10 -c 20
+
# Additional mrpe configs
# The include files can be changed during the runtime
include \\ab = C:\includes\ab_mrpe.cfg
include \\NT-AUTORITÄT\SYSTEM = C:\includes\system_mrpe.cfg
+
# If you omit the user the file is executed with the current user
include = C:\includes\default.cfg
F-:
@@ -28,13 +30,15 @@ F-:
The syntax in the mrpe include file is the same as in the mrpe section, with the exception
that you cannot add further includes in a include file. There is also no need to define a <tt>[mrpe]</tt>
section in an included file. You just need to define the <tt>check</tt> lines here.
+
F+:ab_mrpe.cfg
check = Dummy mrpe\check_crit
check = IP_Configuration mrpe\check_ipconfig 1.2.3.4
F-:
+
<b>Important:</b> Keep in mind that the agent needs the permission to run
scripts as other user. Internally it uses the windows command <tt>runas /User:</tt>
-which prompts for a password if agent has no permission to change to this user.<br>
+which prompts for a password if agent has no permission to change to this user.
In this case the check_mk agent will get stuck!
diff --git a/ChangeLog b/ChangeLog
index ac6c6e9..af93fea 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -2,6 +2,7 @@
Core & Setup:
* 1008 Overall check timeout for Check_MK checks now defaults to CRIT state...
* 1373 SEC: Do not ouput complete command line when datasource programs fail...
+ * 1425 New section header option "encoding" for agent output...
* 1129 FIX: Windows MSI-Installer: some systems created corrupted check_mk_agent.msi files...
Checks & Agents:
@@ -79,9 +80,7 @@
* 1447 domino_transactions: new check to monitor the number of transactions per minute on Lotus Domino servers
* 1190 statgrab_cpu: Check can now handle parameters
* 1191 Linux agent now also sends information about tmpfs...
- * 1424 mknotifyd: now able to check if its still listening for telegrams...
* 1193 ps: Manual Checks can now use RegEx for user matching...
- * 1425 New section header option "encoding"...
* 1051 FIX: tcp_conn_stats: fix missing performance data...
* 1142 FIX: winperf_ts_sessions: fix computation, check has never really worked
* 1090 FIX: zfsget: fixed exception which happened on incomplete zfs entries
@@ -174,6 +173,7 @@
* 1123 Rule based notifications: New condition "Match Service Groups"
* 1186 RBN: It's now possible to Filter for contactgroups...
* 1189 sms notification: also send information about Downtimes, Acknowledgments and Fallping now
+ * 1424 mknotifyd: now able to check if its still listening for telegrams...
* 1156 FIX: Graphs in HTML mails are now sent again where they where missing...
* 1157 FIX: Fixed SMS plugin on at least debian (distrs which have no sendsms/smssend)...
* 1407 FIX: Fix exception in rule based notification on non-Ascii characters in log message
@@ -189,7 +189,7 @@
* 1399 FIX: Fix left-over tac processes when showing Event Console history...
* 1402 FIX: Fixed cased where counting events did not reach required count...
* 1124 FIX: WATO EC configuration: no longer raises an exception when user has restricted WATO access...
- * 1125 FIX: EC actions couldn't get saved when a EC rule had "Send monitoring notification" set...
+ * 1125 FIX: EC actions are now saved when an EC rule has "Send monitoring notification" set...
HW/SW-Inventory:
* 0643 windows inventory: OS now contains the install date, reg_uninstall now contains the path...
Module: check_mk
Branch: master
Commit: 81e6db5d81984091255cadbc21cc7e6daa7eb386
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=81e6db5d819840…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Mon Oct 27 16:02:54 2014 +0100
Updated formatting of Werk #1425, again
---
.werks/1425 | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/.werks/1425 b/.werks/1425
index 968aec1..901afa2 100644
--- a/.werks/1425
+++ b/.werks/1425
@@ -8,7 +8,11 @@ Class: feature
If you write your own check plugins you might know that a section
header can contain additional options separated by a colon.
-For example <tt><<<lnx_distro:sep(124):persist(141442125)>>></tt>
+For example:
+
+F+:
+<<<lnx_distro:sep(124):persist(141442125)>>>
+F-:
An additional option <tt>encoding</tt> has been introduced.
Generally all check plugins should output valid utf-8 encoded text.
Module: check_mk
Branch: master
Commit: 320953193899551cf915a508aa1e4042177e087a
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=32095319389955…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Mon Oct 27 16:02:18 2014 +0100
Updated formatting of Werk #1425, again
---
.werks/1425 | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.werks/1425 b/.werks/1425
index 9b91d34..968aec1 100644
--- a/.werks/1425
+++ b/.werks/1425
@@ -8,7 +8,7 @@ Class: feature
If you write your own check plugins you might know that a section
header can contain additional options separated by a colon.
-For example <tt><<<lnx_distro:sep(124):persist(141442125)>>></tt>
+For example <tt><<<lnx_distro:sep(124):persist(141442125)>>></tt>
An additional option <tt>encoding</tt> has been introduced.
Generally all check plugins should output valid utf-8 encoded text.
Module: check_mk
Branch: master
Commit: 7e6d75afd0c557199521ae3a68c6df27792a1e4a
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=7e6d75afd0c557…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Mon Oct 27 16:01:29 2014 +0100
Updated formatting of Werk #1425
---
.werks/1425 | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/.werks/1425 b/.werks/1425
index 0a91837..9b91d34 100644
--- a/.werks/1425
+++ b/.werks/1425
@@ -7,13 +7,14 @@ Date: 1414421080
Class: feature
If you write your own check plugins you might know that a section
-header can contain additional options separated by a colon.<br>
-For example <tt><<<lnx_distro:sep(124):persist(141442125)>>></tt><br><br>
+header can contain additional options separated by a colon.
+For example <tt><<<lnx_distro:sep(124):persist(141442125)>>></tt>
An additional option <tt>encoding</tt> has been introduced.
Generally all check plugins should output valid utf-8 encoded text.
In some instances this is not possible, because the plugin itself
has its own hardcoded encoding. With the encoding option you can specify
-the encoding for this entire section.<br>
+the encoding for this entire section.
+
Check_MK will decode the given section output and recode it into utf-8 for
further processing.
Module: check_mk
Branch: master
Commit: 77b01ae1809e9fd40a709796eaa21f0151e284e1
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=77b01ae1809e9f…
Author: Andreas Boesl <ab(a)mathias-kettner.de>
Date: Mon Oct 27 15:53:59 2014 +0100
#1425 New section header option "encoding"
If you write your own check plugins you might know that a section
header can contain additional options separated by a colon.<br>
For example <tt><<<lnx_distro:sep(124):persist(141442125)>>></tt><br><br>
An additional option <tt>encoding</tt> has been introduced.
Generally all check plugins should output valid utf-8 encoded text.
In some instances this is not possible, because the plugin itself
has its own hardcoded encoding. With the encoding option you can specify
the encoding for this entire section.<br>
Check_MK will decode the given section output and recode it into utf-8 for
further processing.
---
.werks/1425 | 19 +++++++++++++++++++
ChangeLog | 1 +
modules/check_mk_base.py | 10 ++++++++++
3 files changed, 30 insertions(+)
diff --git a/.werks/1425 b/.werks/1425
new file mode 100644
index 0000000..0a91837
--- /dev/null
+++ b/.werks/1425
@@ -0,0 +1,19 @@
+Title: New section header option "encoding"
+Level: 1
+Component: checks
+Compatible: compat
+Version: 1.2.5i6
+Date: 1414421080
+Class: feature
+
+If you write your own check plugins you might know that a section
+header can contain additional options separated by a colon.<br>
+For example <tt><<<lnx_distro:sep(124):persist(141442125)>>></tt><br><br>
+
+An additional option <tt>encoding</tt> has been introduced.
+Generally all check plugins should output valid utf-8 encoded text.
+In some instances this is not possible, because the plugin itself
+has its own hardcoded encoding. With the encoding option you can specify
+the encoding for this entire section.<br>
+Check_MK will decode the given section output and recode it into utf-8 for
+further processing.
diff --git a/ChangeLog b/ChangeLog
index ff01a77..ac6c6e9 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -81,6 +81,7 @@
* 1191 Linux agent now also sends information about tmpfs...
* 1424 mknotifyd: now able to check if its still listening for telegrams...
* 1193 ps: Manual Checks can now use RegEx for user matching...
+ * 1425 New section header option "encoding"...
* 1051 FIX: tcp_conn_stats: fix missing performance data...
* 1142 FIX: winperf_ts_sessions: fix computation, check has never really worked
* 1090 FIX: zfsget: fixed exception which happened on incomplete zfs entries
diff --git a/modules/check_mk_base.py b/modules/check_mk_base.py
index 795c989..750349f 100644
--- a/modules/check_mk_base.py
+++ b/modules/check_mk_base.py
@@ -757,6 +757,7 @@ def parse_info(lines, hostname):
section = []
section_options = {}
separator = None
+ encoding = None
for line in lines:
if line[:4] == '<<<<' and line[-4:] == '>>>>':
host = line[4:-4]
@@ -799,7 +800,16 @@ def parse_info(lines, hostname):
until = int(section_options["persist"])
persist[section_name] = ( until, section )
+ # The section data might have a different encoding
+ encoding = section_options.get("encoding")
+
elif line != '':
+ if encoding:
+ try:
+ decoded_line = line.decode(encoding)
+ line = decoded_line.encode('utf-8')
+ except:
+ pass
section.append(line.split(separator))
return info, piggybacked, persist
Module: check_mk
Branch: master
Commit: b6e78726694f0ebd2b087c520d01d514fc4d049e
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=b6e78726694f0e…
Author: Bastian Kuhn <bk(a)mathias-kettner.de>
Date: Mon Oct 27 14:46:00 2014 +0100
#1193 ps: Manual Checks can now use RegEx for user matching
If you start the username with a tilde, the string will be interpreted as RegEx.
When using Wato just choice RegEx in the Dropdown.
---
.werks/1193 | 11 +++++++++++
ChangeLog | 1 +
checks/ps.include | 6 +++++-
web/plugins/wato/check_parameters.py | 26 +++++++++++++++++++++++---
4 files changed, 40 insertions(+), 4 deletions(-)
diff --git a/.werks/1193 b/.werks/1193
new file mode 100644
index 0000000..1db3401
--- /dev/null
+++ b/.werks/1193
@@ -0,0 +1,11 @@
+Title: ps: Manual Checks can now use RegEx for user matching
+Level: 1
+Component: checks
+Compatible: compat
+Version: 1.2.5i6
+Date: 1414417457
+Class: feature
+
+If you start the username with a tilde, the string will be interpreted as RegEx.
+When using Wato just choice RegEx in the Dropdown.
+
diff --git a/ChangeLog b/ChangeLog
index 82f1df8..ff01a77 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -80,6 +80,7 @@
* 1190 statgrab_cpu: Check can now handle parameters
* 1191 Linux agent now also sends information about tmpfs...
* 1424 mknotifyd: now able to check if its still listening for telegrams...
+ * 1193 ps: Manual Checks can now use RegEx for user matching...
* 1051 FIX: tcp_conn_stats: fix missing performance data...
* 1142 FIX: winperf_ts_sessions: fix computation, check has never really worked
* 1090 FIX: zfsget: fixed exception which happened on incomplete zfs entries
diff --git a/checks/ps.include b/checks/ps.include
index 22e5336..6b12e90 100644
--- a/checks/ps.include
+++ b/checks/ps.include
@@ -165,7 +165,11 @@ def process_matches(ps, procname, l_user):
if ps[0].startswith("(") and ps[0].endswith(")") and len(ps) > 1:
addinfo = ps[0][1:-1].split(",")
user = addinfo[0]
- if userspec and userspec != user:
+ if userspec and userspec.startswith('~'):
+ if not re.match(userspec[1:], user):
+ return False
+
+ elif userspec and userspec != user:
return False
l_user[0] = user # return actual user that way
ps = ps[1:]
diff --git a/web/plugins/wato/check_parameters.py b/web/plugins/wato/check_parameters.py
index 6cc3199..800c8aa 100644
--- a/web/plugins/wato/check_parameters.py
+++ b/web/plugins/wato/check_parameters.py
@@ -6034,10 +6034,30 @@ register_check_parameters(
title = _("Maximum number of matched process for WARNING state"),
default_value = 1,
)),
- ( "user", TextAscii(
+ ( "user", Alternative(
title = _("Name of operating system user"),
- help = _("Leave this empty, if the user does not matter"),
- none_is_empty = True,
+ style = "dropdown",
+ elements = [
+ TextAscii(
+ title = _("Exact name of the oeprating system user")
+ ),
+ Transform(
+ RegExp(size = 50),
+ title = _("Regular expression matching username"),
+ help = _("This regex must match the <i>beginning</i> of the complete "
+ "username"),
+ forth = lambda x: x[1:], # remove ~
+ back = lambda x: "~" + x, # prefix ~
+ ),
+ FixedValue(
+ None,
+ totext = "",
+ title = _("Match all users"),
+ )
+
+ ],
+ match = lambda x: (not x and 2) or (x[0] == '~' and 1 or 0)
+
)),
( "cpulevels",
Tuple(