MSSQL 2014: Discover SQL Server 2014 Agent Jobs

Microsoft.SQLServer.2014.AgentJobDiscoveryRule (Discovery)

This discovery rule discovers all SQL Server 2014 Agent jobs.

Knowledge Base article:

Summary

This discovery rule discovers all SQL Server 2014 Agent jobs.

Configuration

Override this discovery for selected instances or groups to enable SQL Server 2014 Agent jobs discovery.

Overrideable Parameters

Name

Description

Default Value

Enabled

Enables or disables the workflow.

No

Interval (seconds)

The recurring interval of time in seconds in which to run the workflow.

14400

Synchronization Time

The synchronization time specified by using a 24-hour format. May be omitted.

 

Timeout (seconds)

Specifies the time the workflow is allowed to run before being closed and marked as failed.

300

Element properties:

TargetMicrosoft.SQLServer.2014.Agent
EnabledFalse
Frequency14400
RemotableFalse

Object Discovery Details:

Discovered Classes and their attribuets:

Member Modules:

ID Module Type TypeId RunAs 
DS DataSource Microsoft.SQLServer.2014.AgentJobDiscovery Default

Source Code:

<Discovery ID="Microsoft.SQLServer.2014.AgentJobDiscoveryRule" Enabled="false" Target="Microsoft.SQLServer.2014.Agent">
<Category>Discovery</Category>
<DiscoveryTypes>
<DiscoveryClass TypeID="Microsoft.SQLServer.2014.AgentJob">
<Property TypeID="Microsoft.SQLServer.2014.AgentJob" PropertyID="JobID"/>
<Property TypeID="Microsoft.SQLServer.2014.AgentJob" PropertyID="Name"/>
<Property TypeID="Microsoft.SQLServer.2014.AgentJob" PropertyID="Description"/>
<Property TypeID="Microsoft.SQLServer.2014.AgentJob" PropertyID="Category"/>
<Property TypeID="Microsoft.SQLServer.2014.AgentJob" PropertyID="Owner"/>
<Property TypeID="Microsoft.SQLServer.2014.AgentJob" PropertyID="OriginatingServer"/>
<Property TypeID="Microsoft.SQLServer.2014.AgentJob" PropertyID="IsEnabled"/>
</DiscoveryClass>
</DiscoveryTypes>
<DataSource ID="DS" TypeID="Microsoft.SQLServer.2014.AgentJobDiscovery">
<IntervalSeconds>14400</IntervalSeconds>
<SyncTime/>
<ComputerID>$Target/Host/Host/Property[Type="Windows!Microsoft.Windows.Computer"]/PrincipalName$</ComputerID>
<ComputerName>$Target/Host/Host/Property[Type="Windows!Microsoft.Windows.Computer"]/NetworkName$</ComputerName>
<SQLConnectionString>$Target/Host/Property[Type="Microsoft.SQLServer.2014.DBEngine"]/ConnectionString$</SQLConnectionString>
<SQLInstanceName>$Target/Host/Property[Type="Microsoft.SQLServer.2014.ServerRole"]/InstanceName$</SQLInstanceName>
<ServiceName>$Target/Property[Type="Microsoft.SQLServer.2014.Agent"]/ServiceName$</ServiceName>
<TimeoutSeconds>300</TimeoutSeconds>
</DataSource>
</Discovery>