Use this Knowledge Script to measure the size of mailboxes by either the number of messages in the mailbox, or by total message size in MB. You can monitor average mailbox size and individual mailbox size for the top n mailboxes. This script raises an event if average mailbox size and individual mailbox size exceed the threshold you set.
A job executed on a database in an Exchange Server 2010, 2013, 2016, and 2019 DAG cause the job to run on all servers in the DAG. However, only the server that currently owns the database monitors that database.
Exchange2007_MailboxServer
Exchange2007_Store_Group
Exchange2007_Store_Database
Exchange2010_MailboxServer
Exchange2010_Store_Database
Exchange2010_DAG_Databases
Exchange2013_MailboxServer
Exchange2013_Store_Database
Exchange2013_DAG_Databases
Exchange2016_MailboxServer
Exchange2016_Store_Database
Exchange2016_DAG_Databases
Exchange2019_MailboxServer
Exchange2019_Store_Database
Exchange2019_DAG_Databases
By default, this script runs every hour.
Set the following parameters as needed:
Parameter |
How to Set It |
---|---|
General Settings |
|
Measure mailbox size in MB or by number of messages |
Select how you want to measure the size of mailboxes:
The default is Total message size. |
Comma-separated list of mailboxes to ignore |
Provide a list of mailbox display names that this script should ignore when measuring mailbox size. Separate the names with a comma. NOTE:Ensure you provide the mailbox display name, not the mailbox alias. |
Job failure event notification |
|
Event severity when job fails |
Set the severity level, from 1 to 40, to indicate the importance of an event in which the MBS_MailboxUsage job fails. The default is 5. |
Monitor Average Mailbox Size |
|
Number of largest mailboxes to be averaged |
Set the top n mailboxes whose average size you want to monitor. The default is 10 mailboxes, the minimum is 0, and the maximum is 2147483647 |
Event Notification |
|
Raise event if average mailbox size exceeds threshold? |
Select Yes to raise an event if the average size of the top n mailboxes exceeds the threshold you set. The default is Yes. Use the Number of largest mailboxes to be averaged parameter to determine the value of n. AppManager uses Exchange cmdlets to determine the largest mailboxes, based on number and size of mailboxes and messages. |
Threshold -- Maximum average mailbox size in MB or by number of messages |
Set the maximum average size that the top n mailboxes can attain before an event is raised. The default is 100. The average is based on either the total number of messages in the top n mailboxes, or the total size in MB of the top n mailboxes, depending on your selection in the Measure mailbox size by total message size or message count parameter. |
Event severity when average mailbox size exceeds threshold |
Set the severity level, from 1 to 40, to indicate the importance of an event in which the average size of the top n mailboxes exceeds the threshold. The default is 5. |
Data Collection |
|
Collect data for average mailbox size? |
Select Yes to collect data for charts and reports. When enabled, data collection returns one of the following data streams:
The default is No. |
Monitor Individual Mailbox Size |
|
Number of largest mailboxes to be monitored |
Set the top n mailboxes whose individual size you want to monitor. The default is 10 mailboxes, the minimum is 0, and the maximum is 2147483647. |
Event Notification |
|
Raise event if individual mailbox size exceeds threshold? |
Select Yes to raise an event if the size of any one of the top n mailboxes exceeds the threshold you set. The default is Yes. Use the Number of largest mailboxes to be monitored parameter to determine the value of n. AppManager uses Exchange cmdlets to determine the largest mailboxes, based on number and size of mailboxes and messages. |
Threshold - Maximum individual mailbox size in MB or by number of messages |
Set the maximum size that any one of the top n mailboxes can attain before an event is raised. The default is 250. The size is based on either the total number of messages in the top n mailboxes, or the total size in MB of the top n mailboxes, depending on your selection in the Measure mailbox size by message count or total message size parameter. |
Event severity when individual mailbox size exceeds threshold |
Set the severity level, from 1 to 40, to indicate the importance of an event in which the size of any one of the top n mailboxes exceeds the threshold. The default is 5. |
Data Collection |
|
Collect data for individual mailbox size? |
Select Yes to collect data for charts and reports. When enabled, data collection returns the following data streams:
Use the Number of largest mailboxes to be monitored parameter to determine the value of n. The default is No. |