**************************************************************** * check_be - Nagios plugin for Symantec BackupExec for Windows * * by Toussaint OTTAVI (t.ottavi@medi.fr) * **************************************************************** This is a windows executable, to be run on Windows servers where BackupExec is installed. It will process all the job history files, find the most recent occurrence of a specified job name, then it will return the current status of this job. It can also return a 'warning' or 'critical' status if the last job found is older than the specified amount of days. 1/ HOW TO USE THIS SOFTWARE --------------------------- Run check_be.exe in a Windows console, with the following syntax : check_be "path of XML files" "Name of the backup job" - "Path of XML files" is the location where BackupExec puts its log files in XML format. Default locations for these files are : v10: c:\program files\veritas\backup exec\nt\data v12: c:\Program Files\Symantec\Backup Exec\Data - "Name of the backup job log" is the name of the job you want to check. It's case independant. Possible switches are : -h : Shows brief syntax help -d : Writes detailed debug information. This can help determining what's wrong in case of any problem. -c : Return 'critical' state if the last occurrence of the job is older than days. This can help to determine if a scheduled job is disabled, locked, paused, or any other reason. -w : Same, but for 'warning' state Example of use : check_be "c:\Program Files\Symantec\Backup Exec\Data" "My tape backup" -w1 -c3 Return states are : 'ok' for BackupExec status 2 and 19 'critical' for BackupExec status 0,1,6,7 and 21 'warning' for any other BackupExec status 'unknown' if it can not determine the BackupExec job status, for any reason. 2/ HOW TO USE IT WITH NAGIOS ---------------------------- 2.1/ ON THE MONITORED SERVER You should have nsclient++ installed. In your 'nsc.ini' file, you must declare an external script like this: [NRPE Handlers] ;# COMMAND DEFINITIONS check_be=check_be.exe "c:\program files\veritas\backup exec\nt\data\" "JobName" -w1 -c3 2.2. ON THE NAGIOS SERVER Define a service template : define service{ name template-backupexec use generic-service service_description BackupExec Job Check ; default display name in Nagios check_command check_nrpe!-c check_be ; same name as in the nsclient++ nsc.ini command definition normal_check_interval 60 ; your check intervals here retry_check_interval 60 register 0 ; this is a template } Then, in your object definition, add the following : define service { use template-backupexec service_description BackupExec - Daily DAT backup ; specific display name, if you need host_name MYHOST }