MSSQL 2016: Populate SQL Server 2016 Agents Group

Microsoft.SQLServer.2016.AgentsGroup.Discovery (Discovery)

This discovery rule populates the SQL Server 2016 Agents group with all SQL Server 2016 agents.

Knowledge Base article:

Summary

This discovery rule populates the SQL Server 2016 Agents group with all SQL Server 2016 agents.

Overrideable Parameters

Name

Description

Default Value

Enabled

Enables or disables the workflow.

Yes

Element properties:

TargetMicrosoft.SQLServer.2016.AgentsGroup
EnabledTrue
RemotableFalse

Object Discovery Details:

Discovered Classes and their attribuets:

Member Modules:

ID Module Type TypeId RunAs 
DiscoveryDataSource DataSource Microsoft.SystemCenter.GroupPopulator Default

Source Code:

<Discovery ID="Microsoft.SQLServer.2016.AgentsGroup.Discovery" Target="Microsoft.SQLServer.2016.AgentsGroup" Enabled="true">
<Category>Discovery</Category>
<DiscoveryTypes>
<DiscoveryClass TypeID="Microsoft.SQLServer.2016.AgentsGroup"/>
</DiscoveryTypes>
<DataSource ID="DiscoveryDataSource" TypeID="SC!Microsoft.SystemCenter.GroupPopulator">
<RuleId>$MPElement$</RuleId>
<GroupInstanceId>$Target/Id$</GroupInstanceId>
<MembershipRules>
<MembershipRule>
<MonitoringClass>$MPElement[Name="Discovery!Microsoft.SQLServer.2016.Agent"]$</MonitoringClass>
<RelationshipClass>$MPElement[Name="Microsoft.SQLServer.2016.AgentsGroupContainsAgent"]$</RelationshipClass>
</MembershipRule>
</MembershipRules>
</DataSource>
</Discovery>