Module: check_mk
Branch: master
Commit: a4314bf73188d342951017a9aaff3cbd8e089390
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=a4314bf73188d3…
Author: Andreas Boesl <ab(a)mathias-kettner.de>
Date: Tue Dec 3 11:14:50 2013 +0100
FIX tsm_sessions: fixed invalid check output during backups
The check was unable to handle agent data where no client_name was set.
This could happen during a backup process.
---
.werks/237 | 9 +++++++++
ChangeLog | 1 +
checks/tsm_sessions | 6 +++++-
3 files changed, 15 insertions(+), 1 deletion(-)
diff --git a/.werks/237 b/.werks/237
new file mode 100644
index 0000000..02a097b
--- /dev/null
+++ b/.werks/237
@@ -0,0 +1,9 @@
+Title: tsm_sessions: fixed invalid check output during backups
+Level: 1
+Component: checks
+Version: 1.2.3i7
+Date: 1386065416
+Class: fix
+
+The check was unable to handle agent data where no client_name was set.
+This could happen during a backup process.
diff --git a/ChangeLog b/ChangeLog
index 2c1ecd9..130bdf0 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -48,6 +48,7 @@
* 0012 FIX: Solaris Agent: fixed broken fileinfo section...
* 0297 FIX: mk-job is now also usable on CentOS 5+...
* 0298 FIX: win_dhcp_pools: Fixed wrong percentage calculation
+ * 0237 FIX: tsm_sessions: fixed invalid check output during backups...
Multisite:
* 0001 New filters for selecting several host/service-groups at once...
diff --git a/checks/tsm_sessions b/checks/tsm_sessions
index c13af28..b3d45b0 100644
--- a/checks/tsm_sessions
+++ b/checks/tsm_sessions
@@ -36,7 +36,11 @@ def check_tsm_sessions(item, params, info):
state = 0
warn, crit = params
count = 0
- for sid, client_name, proc_state, wait in info:
+ for entry in info:
+ if len(entry) == 4:
+ sid, client_name, proc_state, wait = entry
+ else:
+ sid, proc_state, wait = entry
if proc_state in ['RecvW', 'MediaW']:
wait = saveint(wait)
if wait >= crit: