Monitoring NTBackup / Windows Server Backup using Nagios passive checks

backupmonitoringnagiosntbackupwindows-server-backup

We're monitoring several (~40 so far) servers using Nagios 3, and after some massive headaches trying to check event logs and text logs and so on with active checks, I've got NSCA installed on our Nagios server. The next step is obviously to have backup software report successful runs using send_nsca, and I've got this working on Windows too (from Nagios Exchange) — BackupExec handily supports running commands only after a backup has been verified, and we're after something similar for NTBackup and Windows Server Backup.

I'm very happy to use a batch file to do this, as NTBackup doesn't seem to have this built-in, but I've found conflicting information on whether NTBackup populates %errorcode% properly (i.e. only if the backup ran without errors).

Does anyone have experience or ideas for getting NTBackup to report this information correctly, or is there some other solution we "should" be using?

Regards,

Carl

Best Answer

script the backup to run normally. ignore the exit code of ntbackup. scrub logfile for interesting parts. send status to nagios via send_ncsa. profit.

the following from MS technet :

Windows 2000 Backup (Ntbackup.exe) does not have a command-line parameter to specify the location to which reports are saved after a backup operation is finished. The backup report is saved in the profiles folder of the user who performed the backup operation. You can view the reports by clicking Report on the Tools menu in Backup.

Backup keeps only the last 10 backup reports. The corresponding Backup##.log files are located in the "Documents and Settings\User_Name\Local Settings\Application Data\Microsoft\Windows NT\NTbackup\Data" folder.