Module: check_mk
Branch: master
Commit: 3d0ea0f9309c836caccef134a2787403b95d06e8
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=3d0ea0f9309c83…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Sun Oct 24 19:03:16 2010 +0200
ps: inventory on fixed user now correctly sets target user
---
ChangeLog | 2 ++
LIESMICH.zutun | 3 ---
checkman/ps | 3 ++-
checks/ps | 2 +-
4 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index d1f8bbb..c2c1892 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -8,6 +8,8 @@
* hr_fs: inventory now ignores filesystem with size 0,
check does not longer crash on filesystems with size 0
* logwatch: Fixed typo in 'too many unacknowledged logs' error message
+ * ps: fix bug: inventory with fixed user name now correctly puts
+ that user name into the resulting check - not None.
Livestatus:
* Prohibit { and } in regular expressions. This avoids a segmentation
diff --git a/LIESMICH.zutun b/LIESMICH.zutun
index 1ede43a..17a17bc 100644
--- a/LIESMICH.zutun
+++ b/LIESMICH.zutun
@@ -12,9 +12,6 @@ BUGS beheben bis => 1.1.8
--------------------------------------------------------------------------------
CHECK_MK:
-inventory_processes: wenn man hier einen Benuter fest angibt, dann
-wird der nicht übernommen, sondern None fest kodiert.
-
inventory_processes: Wenn man mit GRAB_USER arbeitet und sich die
Prozesse nur im Benutzer unterscheiden, dann muss der Benutzer in
der Servicedescription auftauchen, sonst heissen alle Services gleich.
diff --git a/checkman/ps b/checkman/ps
index d0af038..d1a43a1 100644
--- a/checkman/ps
+++ b/checkman/ps
@@ -49,7 +49,8 @@ inventory:
The {user specification} can either be a user name (string). The inventory
will then trigger only if that user matches the user the process
- is running as. Alternatively you can specify {ANY_USER} or {GRAB_USER}.
+ is running as and the resulting check will require that user.
+ Alternatively you can specify {ANY_USER} or {GRAB_USER}.
If you specify {ANY_USER} then the user field will simply be ignored.
The created check will not check for a specific user. Specifying {GRAB_USER}
makes the created check expect the process to run as the same user as
diff --git a/checks/ps b/checks/ps
index e900d89..7b13972 100644
--- a/checks/ps
+++ b/checks/ps
@@ -84,7 +84,7 @@ def inventory_ps(check_name, info):
if userspec == GRAB_USER:
i_userspec = l_user[0]
else:
- i_userspec = ANY_USER
+ i_userspec = userspec
# Problem here: We need to instantiate all subexpressions
# with their actual values of the found process.
i_pattern = instantiate_regex_pattern(pattern, matches)