Use this Knowledge Script to monitor changes to the number of domain controllers (DCs) in a domain, site, or forest.
The script retrieves the total number and names of all DCs using ADSI (Active Directory Service Interfaces). In addition, this script raises an event if any changes are detected during consecutive iterations. By default, only the local domain or site of the computer running this script is monitored. However, you can supply a list of fully qualified domain names or sites to monitor. The list overrides the local domain or site — that is, the domain of the local computer will not be monitored unless it is included in the list you supply.
This script also raises an event if the number of DCs falls below the minimum threshold or exceeds the maximum threshold.
Active Directory domain controller
The default interval for this script is Every 24 hours.
Set the following parameters as needed:
Parameter |
How to Set It |
---|---|
General Settings |
|
Raise event if job fails |
|
Event severity when job fails |
Set the event severity level, from 1 to 40, to indicate the importance of an event in which the NumberOfDCs job fails. The default is 35. |
Monitor number of domain controllers |
|
Monitor number of DCs in: |
Select the domain, site, or forest where you want to monitor the number of DCs. |
List of fully qualified domains or sites to monitor (comma-separated, no spaces) |
Specify a list of fully qualified domain names or sites to monitor, separated by commas and no spaces. Leave this parameter blank to use the local domain or site of the DC. For example, if you selected domains for the Monitor number of DCs in parameter, you could enter: us.netiq.local,dev.us.netiq.local If you selected sites, enter: netiqus,netiqdev |
Full path to file with list of domains or sites |
To instruct this script to read from a file with a list of domains or sites, rather than entering a list in the List of fully qualified domains or sites to monitor parameter, enter the full directory path to that file here. The path can be to a file on the computer where the AppManager agent is installed (for example, C:\AMAgent\domainsitelist), or a UNC path if the file exists on a different computer (for example, \\Server1\SiteLists\domainsitelist). The file should contain one site per line. The AppManager agent must have read permission for the file. |
Enable job delegation? |
Select Yes to enable the delegation of the job to another server where appropriate. If enabled, runs the job on the selected computer that holds the server role that you selected for the Delegate [scope] monitoring to the... parameter. The default is unselected. For more information, see Section 3.1, AD Knowledge Script Job Delegation. |
Delegate domain-wide monitoring to the |
Select the server role to which the job should be delegated: Primary Domain Controller (PDC), Infrastructure Master, or RID Master. The default is PDC. |
Delegate site-wide monitoring to the |
Indicates the server role to which the job should be delegated, the ISTG. |
Delegate forest-wide monitoring to the |
Select the server role to which the job should be delegated: Domain Master or Schema Master. The default is Domain Master. |
Raise event when DC assumes this role? |
If you enabled job delegation, set to Yes to raise events if the DC assumes the server role you selected for the Delegate [scope] monitoring to the... parameter. The event indicates that the monitored computer has assumed the selected role. The default is Yes. |
Event severity when DC assumes this role |
Set the severity level, from 1 to 40, to indicate the importance of an event in which the DC assumes the role you selected for the Delegate [scope] monitoring to the... parameter. The default is 30. |
Raise event when DC relinquishes this role? |
If you enabled job delegation, set to Yes to enable events if the DC gives up the server role you selected for the Delegate [scope] monitoring to the... parameter. The event indicates that the monitored computer has relinquished the selected role. The default is Yes. |
Event severity when DC relinquishes this role |
Set the severity level, from 1 to 40, to indicate the importance of an event in which the DC relinquishes the role you selected for the Delegate [scope] monitoring to the... parameter. The default is 30. |
Event Notification |
|
Raise event if threshold exceeded or not met? |
Select Yes to raise an event if the number of DCs exceeds or falls below the threshold you set. The default is Yes. |
Threshold -- Minimum number of domain controllers |
Specify the minimum number of DCs that must exist to prevent an event from being raised. The default is 2 DCs. |
Threshold -- Maximum number of domain controllers |
Specify the maximum number of DCs that can exist before an event is raised. The default is 20 DCs. |
Event severity when threshold exceeded or not met |
Set the severity level, from 1 to 40, to indicate the importance of ant in which the number of DCs exceeds or falls below the threshold. The default is 5. |
Data Collection |
|
Collect data for number of DCs? |
Select Yes to collect data for charts and reports. If enabled, data collection returns the number of DCs detected during the monitoring interval. The default is unselected. |