3.15 RecycleBinInfo

Use this Knowledge Script to monitor Recycle Bin usage for all Web applications running on the SharePoint server. This script raises an event if the percentage of the site quota for the Recycle Bin exceeds the specified threshold.

This script monitors two stages of Recycle Bins for site quota usage. By default, SharePoint Server enables the first, or primary, stage of the Recycle Bin. To monitor the secondary stage of the Recycle Bin, enable the secondary Recycle Bin. For more information about enabling the Recycle Bin features, see the Microsoft SharePoint documentation.

For each stage, you can configure this script to raise a warning alert or critical alert when Recycle Bin site quota utilization exceeds a particular threshold. In addition, you can configure this script to empty the Recycle Bin when it reaches a specific threshold, and to raise an event when primary or secondary stage Recycle Bin items have been deleted.

The secondary Recycle Bin utilizes 50% of the site quota value. For example, if the site quota value is 10 MB, by default the secondary recycle bin uses 5 MB. The value of the secondary Recycle Bin can be customized by changing the value of the site quota.

3.15.1 Resource Objects

SharePoint Server: Web Applications

3.15.2 Default Schedule

The default interval for this script is every 24 hours.

3.15.3 Setting Parameter Values

Set the following parameters as needed:

Description

How to Set It

General Settings

Job failure event notification

Event severity when job fails

Set the event severity level, from 1 to 40, to indicate the importance of an event in which the job fails to monitor a Recycle Bin. The default is 5.

Monitor Recycle Bin Information

Comma-separated list of Web applications to exclude

Specify a list of Web applications to ignore when monitoring. Use commas to separate multiple Web applications.

File path of a file containing a list of site collection URLs to exclude from monitoring (one per line)

Specify the UNC or file path of a file that contains a list of sites to ignore when monitoring. In the file, list the sites to be excluded, one site per line.

The site collection URLs in your list must be in the same format as they appear in event messages. Include the http:// at the beginning of the URL, and do not include a trailing "/" at the end of the URL (which will cause the job to monitor the site collection you are trying to exclude).

When a quota is not configured for a site, set a value to calculate the site’s utilization

Specify a value for a site that does not have a quota configured. This value is used to calculate the utilization percentage of the site. The default is 0, which means that this script will not monitor Recycle Bins for site collections that do not have a quota configured.

Event Notification

Monitor First Stage Recycle Bin

Raise warning event if first stage Recycle Bin site quota utilization exceeds threshold?

Select Yes to raise a warning event if the first stage Recycle Bin site quota exceeds the threshold you set. The default is Yes.

By default, the Knowledge Script job reads the quota configured in the SharePoint site. If the quota is not configured in the site, the job reads the quota configured in this Knowledge Script.

Event severity when first stage Recycle Bin site quota utilization exceeds threshold

Set the severity level, from 1 to 40, to indicate the importance of an event in which the first stage site quota usage threshold is exceeded. The default is 15.

Threshold -- Maximum warning threshold for first stage Recycle Bin site quota utilization

Specify the maximum first stage site quota utilization allowed before a warning event is raised. The default is 85%.

Raise critical event if first stage Recycle Bin site quota utilization exceeds threshold?

Select Yes to raise a critical event if the first stage Recycle Bin site quota exceeds the threshold you set. The default is Yes.

By default, the Knowledge Script job reads the quota configured in the SharePoint site. If the quota is not configured in the site, the job reads the quota configured in this Knowledge Script.

Event severity when first stage Recycle Bin site quota utilization exceeds threshold

Set the severity level, from 1 to 40, to indicate the importance of an event in which the first stage site quota usage threshold is exceeded. The default is 10.

Threshold -- Maximum critical threshold for first stage Recycle Bin site quota utilization

Specify the maximum site quota utilization allowed before a critical event is raised. The default is 95%.

Empty first stage Recycle Bin if site quota utilization exceeds critical threshold?

Select Yes to empty the first stage Recycle Bin if the site quota utilization exceeds the threshold you set for raising critical events. The default is unselected.

Raise event when all the first stage Recycle Bin items are deleted successfully?

Select Yes to raise an event when the first stage Recycle Bin items are deleted. The default is unselected.

Event severity when all the first stage Recycle Bin items are deleted successfully

Set the severity level, from 1 to 40, to indicate the importance of an event in which the first stage Recycle Bin items are deleted. The default is 25.

Monitor Second Stage Recycle Bin

Raise warning event if second stage Recycle Bin site quota utilization exceeds threshold?

Select Yes to raise a warning event if the second stage Recycle Bin site quota exceeds the threshold you set. The default is Yes.

By default, the Knowledge Script job reads the quota configured in the SharePoint site. If the quota is not configured in the site, the job reads the quota configured in this Knowledge Script.

Event severity when second stage Recycle Bin site quota utilization exceeds threshold

Set the severity level, from 1 to 40, to indicate the importance of an event in which the second stage site quota usage threshold is exceeded. The default is 15.

Threshold -- Maximum warning threshold for second stage Recycle Bin site quota utilization

Specify the maximum second stage site quota utilization allowed before a warning event is raised. The default is 85%.

Raise critical event if second stage Recycle Bin site quota utilization exceeds threshold?

Select Yes to raise a critical event if the second stage Recycle Bin site quota exceeds the threshold you set. The default is Yes.

By default, the Knowledge Script job reads the quota configured in the SharePoint site. If the quota is not configured in the site, the job reads the quota configured in this Knowledge Script.

Event severity when second stage Recycle Bin site quota utilization exceeds threshold

Set the severity level, from 1 to 40, to indicate the importance of an event in which the second stage site quota usage threshold is exceeded. The default is 10.

Threshold -- Maximum critical threshold for second stage Recycle Bin site quota utilization

Specify the maximum site quota utilization allowed before a critical event is raised. The default is 95%.

Empty second stage Recycle Bin if site quota utilization exceeds critical threshold?

Select Yes to empty the second stage Recycle Bin if the site quota utilization exceeds the threshold you set for raising critical events. The default is unselected.

Raise event when all the second stage Recycle Bin items are deleted successfully?

Select Yes to raise an event when the second stage Recycle Bin items are deleted. The default is unselected.

Event severity when all the second stage Recycle Bin items are deleted successfully

Set the severity level, from 1 to 40, to indicate the importance of an event in which the second stage Recycle Bin items are deleted. The default is 25.

Raise event if a site does not have a quota template configured?

Select Yes to raise an event if the site does not have a quota template configured. The default is unselected.

Event severity when a site does not have a quota template configured

Set the event severity level, from 1 to 40, to indicate the importance of an event in which a site does not have a quota template configured. The default is 11.

Data Collection

Collect data for first stage Recycle Bin site quota utilization?

Select Yes to collect data for charts and reports. If enabled, data collection returns data for first stage Recycle Bin site quota use. The default is unselected.

The RecycleBinInfo script will not collect data if the quota is set to 0, or if the following parameter is set to 0: When a quota is not configured for a site, set a value to calculate the site’s utilization, even if you select Yes for that parameter.

Collect data for second stage Recycle Bin site quota utilization?

Select Yes to collect data for charts and reports. If enabled, data collection returns data for second stage Recycle Bin site quota use. The default is unselected.

The RecycleBinInfo script will not collect data if the quota is set to 0, or if the following parameter is set to 0: When a quota is not configured for a site, set a value to calculate the site’s utilization, even if you select Yes for that parameter.