Submit a ticketCall us

Have You Auto Renewed? If not, you're missing out.
The SolarWinds Renewal Program comes with a host of benefits including the most recent product updates, 24/7 technical support, virtual instructor-led training and more. Experience all of this with the convenience of Auto Renewal, and never worry about missing any of these great benefits. Learn More.

Home > Success Center > Server & Application Monitor (SAM) > AppInsight for SQL: How "SQL Job Agent Info" Monitor works

AppInsight for SQL: How "SQL Job Agent Info" Monitor works

Table of contents

Updated March 11th, 2016

Overview

This article provides information on how AppInsight for SQL works.

Environment

All SAM versions

Detail

Following is a description of how AppInsight for SQL's "SQL Job Agent Info" Monitor currently works:

 

  1. The Monitor runs the following script against the SQL Server being monitored:

 

SELECT
    j.name,
    j.job_id, 
    a.last_executed_step_date,
    h.run_status,
    h.run_duration
FROM [msdb].[dbo].[sysjobs] j
LEFT JOIN [msdb].[dbo].[sysjobactivity] a on j.job_id=a.job_id
LEFT JOIN [msdb].[dbo].[sysjobhistory] h on a.job_history_id=h.instance_id
WHERE h.step_id=0

 

  1. Each Job's "Run_Status" column value is reviewed.
  2. The retrieved values are reported back by the Monitor.

 

The possible values are:

 

0 = Failed
1 = Succeeded
2 = Retry
3 = Canceled
4 = In progress

 

 

  • If a job was never run, then it has a status of Available (Up)

  • If a last run was successful, the status is calculated based on the duration threshold

  • If the last run has a status of Failed, the status is set to Critical

  • If the last run has a status of Retry or Cancelled, the status is set to Warning

 

SAM does not poll information about the job scheduling state.

 

Last modified

Tags

Classifications

Public