3.31 NumberOfObjects

Use this Knowledge Script to monitor the number of objects in a domain or organizational unit. This script raises an event if the number of objects exceeds the threshold you set.

Monitor the number of objects in your user domains to proactively detect any significant growth in the total number of objects. Large object growth is an unusual and serious event. Large growth overwhelms replication, causes high CPU on all affected domain controllers, and can create out-of-disk space conditions.

HINT:The recommended value for the Threshold -- Maximum number of objects parameter is the current number of objects, plus 10% of that value.

3.31.1 Resource Objects

Active Directory domain or organizational unit (OU)

To monitor OUs with this script, specify organizationalUnit in the Classes to include parameter of the Discovery_ActiveDS Knowledge Script.

When run on an OU, this script monitors all objects in that OU and any child OUs. The total number of objects for an OU consists of all objects in the OU and in any child OUs.

When you run this script on a domain, the domain and all child OUs will show a job is running; but, in reality, the script runs only on the domain and not on the child OUs.

3.31.2 Default Schedule

The default interval for this script is Every 24 hours.

3.31.3 Setting Parameter Values

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 severity level, from 1 to 40, to indicate the importance of an event in which the NumberOfObjects job fails. The default is 35.

Monitor number of objects

Object class to check (* for all objects)

Select the type of Active Directory object to check: domain, computer, or user. Select an asterisk (*) to check for all objects. The default is none.

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 domain-wide 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.

Raise event when DC assumes this role?

If you enabled job delegation, set to Yes to enable events if the DC assumes the server role you selected for the Delegate domain-wide 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 domain-wide 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 domain-wide 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 domain-wide monitoring to the... parameter. The default is 30.

Event Notification

Raise event when number of objects exceeds threshold?

Select Yes to raise an event if the number of objects in the organizational unit exceeds the threshold you set. The default is Yes.

Threshold -- Maximum number of objects in class

Specify the maximum number of objects of the specified class that can be in the organizational unit before an event is raised. The default is -1 object.

NOTE:Change the default setting to run this script. Collect data to establish a baseline, then specify a threshold appropriate to your environment.

Event severity when number of objects exceeds threshold

Set the severity level, from 1 to 40, to indicate the importance of an event in which the number of objects in the organizational unit exceeds the threshold. The default is 5.

Data Collection

Collect data for number of objects?

Select Yes to collect data for charts and reports. If enabled, data collection returns the number of objects detected during the monitoring interval. The default is unselected.

Number of objects to return when collecting data (0 for all objects)

Specify the number of objects you want to include when collecting data. For example, if you set this parameter to 500 and the domain contains 800 objects, only the first 500 objects are returned. Enter 0 to return all objects. The default is 500 objects.