Module: check_mk
Branch: master
Commit: fa768bd6342b346f71f38fb1ebbb29e23616b3cc
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=fa768bd6342b34…
Author: Bernd Stroessenreuther <bs(a)mathias-kettner.de>
Date: Mon Mar 17 10:37:50 2014 +0100
arcserve_backup: improved documentation (check manpage and comments in the agent plugin)
---
.werks/705 | 8 ++++++++
ChangeLog | 1 +
agents/windows/plugins/arcserve_backup.ps1 | 21 +++++++++++++--------
checkman/arcserve_backup | 10 +++++++---
4 files changed, 29 insertions(+), 11 deletions(-)
diff --git a/.werks/705 b/.werks/705
new file mode 100644
index 0000000..14013f8
--- /dev/null
+++ b/.werks/705
@@ -0,0 +1,8 @@
+Title: arcserve_backup: improved documentation (check manpage and comments in the agent
plugin)
+Level: 1
+Component: checks
+Version: 1.2.5i1
+Date: 1395049017
+Class: feature
+
+
diff --git a/ChangeLog b/ChangeLog
index 1d4dc15..8fefae5 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -109,6 +109,7 @@
* 0591 dell_poweredge_mem: new check to monitor memory modules of Dell PowerEdge
Servers
* 0592 dell_poweredge_pci: new check for pci devices on dell PowerEdge Servers
* 0141 ups_socomec_capacity: Battery Capacity Check for Socomec UPS Devices.
+ * 0705 arcserve_backup: improved documentation (check manpage and comments in the
agent plugin)
* 0103 FIX: services: Fixed bug with service inventory defined in main.mk...
* 0299 FIX: borcade_mlx_fan: Prettified output, handling "other" state now
* 0300 FIX: cisco_fru_power: Trying not to inventorize not plugged in FRUs...
diff --git a/agents/windows/plugins/arcserve_backup.ps1
b/agents/windows/plugins/arcserve_backup.ps1
index 7a51e0e..0b78233 100755
--- a/agents/windows/plugins/arcserve_backup.ps1
+++ b/agents/windows/plugins/arcserve_backup.ps1
@@ -18,7 +18,8 @@
# GetLatestJobId #
##################
function GetLatestJobId($sqlCmd) {
- # Put the command in our sqlCmd
+ # Put the command in our sqlCmd
+ # Please adapt description if english translation is used
$sqlCmd.CommandText = "SELECT top 1 jobid FROM dbo.aslogw WHERE msgtext LIKE
'%Ausführung von Job Sichern%' ORDER BY jobid DESC"
# Create an adapter to put the data we get from SQL and get the data
@@ -34,7 +35,8 @@ function GetLatestJobId($sqlCmd) {
# GetPreLatestJobId #
#####################
function GetPreLatestJobId($sqlCmd, $jobId) {
- # Put the command in our sqlCmd
+ # Put the command in our sqlCmd
+ # Please adapt description if english translation is used
$sqlCmd.CommandText = "SELECT top 1 jobid FROM dbo.aslogw WHERE msgtext LIKE
'%Ausführung von Job Sichern%' AND jobid < " + $jobId + " ORDER BY
jobid DESC"
# Create an adapter to put the data we get from SQL and get the data
@@ -51,7 +53,8 @@ function GetPreLatestJobId($sqlCmd, $jobId) {
#############
function GetStatus($sqlCmd, $jobId) {
- # Put the command in our sqlCmd
+ # Put the command in our sqlCmd
+ # Please adapt description if english translation is used
$sqlCmd.CommandText = "SELECT top 1 msgtext FROM dbo.aslogw WHERE msgtext LIKE
'%Vorgang Sichern%' AND jobid = " + $jobid + " ORDER BY id DESC"
# Create an adapter to put the data we get from SQL and get the data
@@ -70,7 +73,8 @@ function GetStatus($sqlCmd, $jobId) {
##################
function GetBackupFiles($sqlCmd, $jobId) {
- # Put the command in our sqlCmd
+ # Put the command in our sqlCmd
+ # Please adapt description if english translation is used
$sqlCmd.CommandText = "SELECT msgtext FROM dbo.aslogw WHERE msgtext LIKE
'%Verzeichnis(se)%' AND jobid = " + $jobId + " ORDER BY id DESC"
# Create an adapter to put the data we get from SQL and get the data
@@ -89,7 +93,8 @@ function GetBackupFiles($sqlCmd, $jobId) {
##################
function GetDescription($sqlCmd, $jobId) {
- # Put the command in our sqlCmd
+ # Put the command in our sqlCmd
+ # Please adapt description if english translation is used
$sqlCmd.CommandText = "SELECT msgtext + ' (' + convert(varchar(10),
logtime, 104) + ')' FROM dbo.aslogw WHERE msgtext LIKE '%Beschreibung:%'
AND jobid = " + $jobId + " ORDER BY id DESC"
# Create an adapter to put the data we get from SQL and get the data
@@ -110,7 +115,8 @@ function GetDescription($sqlCmd, $jobId) {
# We need no arguments
- # Make a connection with the SQL-server
+ # Make a connection with the SQL-server
+ # Please adapt Server and Database name
$sqlServer = "SATURN\ARCSERVE_DB"
$sqlConnection = New-Object System.Data.SqlClient.SqlConnection
$sqlConnection.ConnectionString = "Server=$sqlServer;Integrated
Security=True;Database=aslog"
@@ -136,6 +142,7 @@ function GetDescription($sqlCmd, $jobId) {
write-output ""
+ # Please adapt job description
if ( $desc.contains("Wochensicherung") ) {
$temp = GetPreLatestJobId $sqlCmd $j
@@ -165,5 +172,3 @@ function GetDescription($sqlCmd, $jobId) {
# Close the SQL-connection
$sqlConnection.Close()
-
-
diff --git a/checkman/arcserve_backup b/checkman/arcserve_backup
index c93ffd1..96976e1 100644
--- a/checkman/arcserve_backup
+++ b/checkman/arcserve_backup
@@ -8,9 +8,13 @@ description:
System. Therefor it queries the database on the backup server. It needs
the arcserve_backup.ps1 agent plugin to be installed there.
- Returns {OK} if the backup job did finish with an OK message, {WARN} if
- the job reported warnings and {CRIT} if the job did report errors.
- {UNKN} is returned if the job did finish with an unidentified message.
+ Please note: On the Arcserve database TCP/IP and named pipes need to
+ be activated for the plugin to work.
+
+ The check returns {OK} if the backup job did finish with an OK message,
+ {WARN} if the job reported warnings and {CRIT} if the job did report
+ errors. {UNKN} is returned if the job did finish with an unidentified
+ message.
Number of directories, number of files and size are only reported but
do never trigger any non-OK state.