Module: check_mk
Branch: master
Commit: d0590df507f9ffdc1ffc72bb96f72e3f263afec5
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=d0590df507f9ff…
Author: Simon Betz <si(a)mathias-kettner.de>
Date: Thu Oct 29 15:41:36 2015 +0100
#2699 windows_tasks: new task success constant 'an instance of the task is already
running'
---
.werks/2699 | 9 +++++++++
ChangeLog | 1 +
checks/windows_tasks | 4 +++-
3 files changed, 13 insertions(+), 1 deletion(-)
diff --git a/.werks/2699 b/.werks/2699
new file mode 100644
index 0000000..a1f5e2b
--- /dev/null
+++ b/.werks/2699
@@ -0,0 +1,9 @@
+Title: windows_tasks: new task success constant 'an instance of the task is already
running'
+Level: 1
+Component: checks
+Compatible: compat
+Version: 1.2.7i4
+Date: 1446129364
+Class: feature
+
+
diff --git a/ChangeLog b/ChangeLog
index 4231352..96c507e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -11,6 +11,7 @@
* 2688 mssql agent plugin can now handle clustered MSSQL instances
* 2703 logwatch.ec: now transfers the service level to the event console...
* 2705 winperf_if: added option to warn if an interface is using dhcp...
+ * 2699 windows_tasks: new task success constant 'an instance of the task is
already running'
* 2660 FIX: fixed windows agent using the wrong working directory...
* 2664 FIX: ps: Speedup in situation with many matching processes...
* 2661 FIX: windows agent: fixed incomplete process list...
diff --git a/checks/windows_tasks b/checks/windows_tasks
index f9ef25d..b3c551d 100644
--- a/checks/windows_tasks
+++ b/checks/windows_tasks
@@ -67,7 +67,7 @@ def check_windows_tasks(item, _no_params, info):
state = 0
label = ""
msg = []
- if last_result not in [ 0, 0x00041301, 0x00041325, 0x00041306 ]: # RUNNING,
QUEUED, CANCELD
+ if last_result not in [ 0, 0x00041301, 0x00041325, 0x00041306, 0x8004131F ]:
# RUNNING, QUEUED, CANCELD, Instance RUNNING
state = 2
label = "(!!)"
msg.append("Service in state: %s%s" % ( last_result, label ) )
@@ -75,6 +75,8 @@ def check_windows_tasks(item, _no_params, info):
msg[-1] += " (currently running)"
elif last_result == 0x00041325:
msg[-1] += " (queued)"
+ elif last_result == 0x8004131F:
+ msg[-1] += " (an instance of the task already running)"
if values['Scheduled Task State'] != 'Enabled':
msg.append("Task not Enabled(!!)")