Module: check_mk
Branch: master
Commit: 33937f0317905fd388d34ca4614252c4fb9922ed
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=33937f0317905f…
Author: Götz Golla <gg(a)mathias-kettner.de>
Date: Wed Nov 6 16:40:05 2013 +0100
veeam_jobs: new check to monitor the backup jobs of the veeam backup tool
This check monitors the status of the backups jobs run by the Veeam
backup tool. In order to carry out the check, the Veeam agent plugin
for windows needs to be installed on the backup server.
---
.werks/64 | 10 +++++++++
ChangeLog | 1 +
checkman/veeam_jobs | 21 +++++++++++++++++++
checks/veeam_jobs | 56 +++++++++++++++++++++++++++++++++++++++++++++++++++
4 files changed, 88 insertions(+)
diff --git a/.werks/64 b/.werks/64
new file mode 100644
index 0000000..cd4929c
--- /dev/null
+++ b/.werks/64
@@ -0,0 +1,10 @@
+Title: veeam_jobs: new check to monitor the backup jobs of the veeam backup tool
+Level: 1
+Component: checks
+Version: 1.2.3i7
+Date: 1383751852
+Class: feature
+
+This check monitors the status of the backups jobs run by the Veeam
+backup tool. In order to carry out the check, the Veeam agent plugin
+for windows needs to be installed on the backup server.
diff --git a/ChangeLog b/ChangeLog
index 57acd14..0916322 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -3,6 +3,7 @@
* 0060 cisco_fantray: new check for monitoring fan trays of Cisco Nexus switches...
* 0061 cisco_cpu: check now recognizes new object cpmCPUTotal5minRev...
* 0063 veeam_client: new check to monitor status of veeam clients with special agent
plugin...
+ * 0064 veeam_jobs: new check to monitor the backup jobs of the veeam backup tool...
* 0024 FIX: cisco_wlc: removed configuration parameter ap_model...
Multisite:
diff --git a/checkman/veeam_jobs b/checkman/veeam_jobs
new file mode 100644
index 0000000..e9121e3
--- /dev/null
+++ b/checkman/veeam_jobs
@@ -0,0 +1,21 @@
+title: veeam backup server check
+agents: windows
+catalog: os/storage
+license: GPL
+distribution: check_mk
+description:
+ This check monitors the status of the backups jobs run by the Veeam
+ backup tool. In order to carry out the check, the Veeam agent plugin
+ needs to be installed on the backup server. See special instructions in the
+ comment section of the two Veeam agent plugin scripts on how to install
+ the scripts.
+
+ This check is {OK} if the result of the backup is {Success}.
+ It is {CRIT} if the result of the backup is {Failed}. It is
+ {UNKNOWN} in all other cases.
+
+inventory:
+ A check will be created for all backup jobs run by the Veeam tool.
+
+item:
+ The name of the backup job.
diff --git a/checks/veeam_jobs b/checks/veeam_jobs
new file mode 100644
index 0000000..491cef9
--- /dev/null
+++ b/checks/veeam_jobs
@@ -0,0 +1,56 @@
+#!/usr/bin/python
+# -*- encoding: utf-8; py-indent-offset: 4 -*-
+# +------------------------------------------------------------------+
+# | ____ _ _ __ __ _ __ |
+# | / ___| |__ ___ ___| | __ | \/ | |/ / |
+# | | | | '_ \ / _ \/ __| |/ / | |\/| | ' / |
+# | | |___| | | | __/ (__| < | | | | . \ |
+# | \____|_| |_|\___|\___|_|\_\___|_| |_|_|\_\ |
+# | |
+# | Copyright Mathias Kettner 2013 mk(a)mathias-kettner.de |
+# +------------------------------------------------------------------+
+#
+# This file is part of Check_MK.
+# The official homepage is at
http://mathias-kettner.de/check_mk.
+#
+# check_mk is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by
+# the Free Software Foundation in version 2. check_mk is distributed
+# in the hope that it will be useful, but WITHOUT ANY WARRANTY; with-
+# out even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE. See the GNU General Public License for more de-
+# ails. You should have received a copy of the GNU General Public
+# License along with GNU Make; see the file COPYING. If not, write
+# to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+# Boston, MA 02110-1301 USA.
+
+state = { "Success": 0, "Failed": 2, "Warning":1,
"InProgress":0, "Pending":0 }
+
+def inventory_veeam_jobs(info):
+ return [ (x[0], None) for x in info ]
+
+
+def check_veeam_jobs(item, params, info):
+ for line in info:
+ if line[0] == item:
+ if line[3] == "Success":
+ state = 0
+ elif line[3] == "Failed":
+ state = 2
+ else:
+ state = 3
+ infotxt = "Result: %s, " % line[3]
+ line.pop(3)
+ line.pop(0)
+ infotxt += ", ".join(map(str,line) )
+ return (state, infotxt )
+
+ return 3, "item not found in agent output"
+
+check_info["veeam_jobs"] = {
+ 'check_function': check_veeam_jobs,
+ 'inventory_function': inventory_veeam_jobs,
+ 'service_description': 'VEEAM Job',
+ 'has_perfdata': False,
+}
+