
SUM(CASE WHEN H.FinalJobStatus = 14 THEN 1 ELSE 0 END) AS FinalStatus_JobResourceDisabled, SUM(CASE WHEN H.FinalJobStatus = 13 THEN 1 ELSE 0 END) AS FinalStatus_JobRecovered, SUM(CASE WHEN H.FinalJobStatus = 12 THEN 1 ELSE 0 END) AS FinalStatus_JobPending, SUM(CASE WHEN H.FinalJobStatus = 11 THEN 1 ELSE 0 END) AS FinalStatus_JobPaused, SUM(CASE WHEN H.FinalJobStatus = 10 THEN 1 ELSE 0 END) AS FinalStatus_JobMissed, SUM(CASE WHEN H.FinalJobStatus = 9 THEN 1 ELSE 0 END) AS FinalStatus_unknownStatusCode9, SUM(CASE WHEN H.FinalJobStatus = 8 THEN 1 ELSE 0 END) AS FinalStatus_JobInvalidTimeWindow, SUM(CASE WHEN H.FinalJobStatus = 7 THEN 1 ELSE 0 END) AS FinalStatus_JobInvalidSchedule, SUM(CASE WHEN H.FinalJobStatus = 6 THEN 1 ELSE 0 END) AS FinalStatus_JobError, SUM(CASE WHEN H.FinalJobStatus = 5 THEN 1 ELSE 0 END) AS FinalStatus_JobOnHold, SUM(CASE WHEN H.FinalJobStatus = 4 THEN 1 ELSE 0 END) AS FinalStatus_JobDispatched, SUM(CASE WHEN H.FinalJobStatus = 3 THEN 1 ELSE 0 END) AS FinalStatus_JobException, SUM(CASE WHEN H.FinalJobStatus = 2 THEN 1 ELSE 0 END) AS FinalStatus_JobCompleted, SUM(CASE WHEN H.FinalJobStatus = 1 THEN 1 ELSE 0 END) AS FinalStatus_JobCancelled, SUM(CASE WHEN H.IsJobActive = 1 THEN 1 ELSE 0 END) AS ActiveJobs, SET = 7 -7 days in each direction for history and scheduled jobs SET = '%-FULL' - we only want to see jobs that with "-FULL" at the end of the job name / use if you want to control it in PRTG in theory you could work around this and actually get information on the scheduler etc. weekly backups (full backups)ĪND J.JobName LIKE BY H.ActualStartTime DESCĪnother SQL script we use is the one below - this actually approaches the whole monitoring more in an overview - it still depends on the JobHistory table, meaning, the job must have been running. LEFT JOIN JobHistorySummary H ON H.JobID = J.JobIDĪND H.ActualStartTime > GETDATE()-8 -adjust this value if needed, 8 helps for the last 8 days. LEFT JOIN Schedule S ON S.ScheduleId = T.ScheduleID LEFT JOIN TaskDefinition T ON T.JobDefinitionID = J.JobDefinitionID H.ActualStartTime, H.EndTime, H.ElapsedTimeSeconds H.TotalDataSizeBytes, H.TotalRateMBMin, H.TotalNumberOfFiles, H.TotalNumberOfDirectories, SQL Script for single job monitoring: SELECT TOP 1 The special channel is FINALJOBSTATUS - in order to have this working you will need the "" file in your %programfilesx86%\PRTG.\Lookups directory - see below for the file. Most channels are rather simple to configure, they are counters, SpeedDisk or BytesDisk - as PRTG has those channel types integrated already.

GETDATE() - 7 -> Here you can Setup how many days the Query will look back. SELECT FinalJobStatus FROM JobHistorySummary WHERE ActualStartTime > GETDATE() - 7 AND JobName LIKE 'JOBNAME' ORDER BY ActualStartTime DESC Of course you have to fill in the Instance and Database Name and the Login Type of the BackupExec Database (can differ from Installations)

Then we just set up an SQL Sensor to query the Backup Database directly and it is working perfectly now. In our opinion this would easily lead to mistakes We just didnt like the Idea of that solution. Then we tried the way with the Email Sensor.

We tried to Setup an Eventlog Sensor first but that was not very successful I just wanted to share our way to Monitor the Backup Solution "BackupExec" from Symantec:
