Module: check_mk
Branch: master
Commit: 1b5b40c26b649d833dadd1faf2d418af9535bf1b
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=1b5b40c26b649d…
Author: Bastian Kuhn <bk(a)mathias-kettner.de>
Date: Mon Oct 27 13:41:23 2014 +0100
#1192 FIX veeam_jobs: Check now recognize sync jobs
The check not longer throws an unknown state.
---
.werks/1192 | 10 ++++++++++
ChangeLog | 1 +
checks/veeam_jobs | 15 +++++++++++----
3 files changed, 22 insertions(+), 4 deletions(-)
diff --git a/.werks/1192 b/.werks/1192
new file mode 100644
index 0000000..eef96f4
--- /dev/null
+++ b/.werks/1192
@@ -0,0 +1,10 @@
+Title: veeam_jobs: Check now recognize sync jobs
+Level: 1
+Component: checks
+Compatible: compat
+Version: 1.2.5i6
+Date: 1414413296
+Class: fix
+
+The check not longer throws an unknown state.
+
diff --git a/ChangeLog b/ChangeLog
index 611298f..29f7ac0 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -122,6 +122,7 @@
* 1131 FIX: esx_vsphere_hostsystem.maintenance: fixed misspelling in service
description...
NOTE: Please refer to the migration notes!
* 1161 FIX: fc_port: Fixed invalid values of counters, fixed wrong values in
graphs...
+ * 1192 FIX: veeam_jobs: Check now recognize sync jobs...
Multisite:
* 1066 New Dashboard Designer...
diff --git a/checks/veeam_jobs b/checks/veeam_jobs
index 56eea79..50ebc3b 100644
--- a/checks/veeam_jobs
+++ b/checks/veeam_jobs
@@ -42,14 +42,21 @@ def inventory_veeam_jobs(info):
def check_veeam_jobs(item, _no_params, info):
for line in info:
if line[0] == item:
- if line[3] == "Success":
+ backup_type = line[1]
+ backup_status = line[3]
+ backup_current = line[2]
+
+ if backup_status == "Success":
+ state = 0
+ elif backup_status == 'Idle' and backup_type ==
"BackupSync":
+ # A sync job is always idle
state = 0
- elif line[2] == "Working":
+ elif backup_current == "Working":
state = 0
line = line[:6]
- elif line[3] == "Failed":
+ elif backup_status == "Failed":
state = 2
- elif line[2] == "Stopped" and line[3] == "Warning":
+ elif backup_current == "Stopped" and backup_status ==
"Warning":
state = 1
else:
state = 3