Exchange 2013 introduced us to the concept of Managed Availability. This reduced the reliance on external entities such as System Center Operations Manager (SCOM) or other 3rd party monitoring tools. Exchange became self aware, started to monitor itself and even perform certain recovery actions.
As an administrator we can review output of some of these monitoring actions using Exchange Management Shell and also event viewer.
In the example below, note that we are using the Get-ServerHealth cmdlet to look at the state of Managed Availability on the local server.
While we can specify the server name explicitly, it can also be useful to use the trick at the end of this post to automatically retrieve the name from an existing PSSession.
Get-ServerHealth (Get-PSSession).ComputerName | Where-Object {$_.Alertvalue -eq "UnHealthy"}
As you will have noticed, there are multiple unhealthy items. If we focus on the MailboxSpace HealthSet, a related EventID is shown below.
This is from EventLog: Microsoft-Exchange-ManagedAvailability/Monitoring
The EventID number is generic, so we need to look at the details in the message.
For readability, the full error message is:
Database 'DB01' is low on log volume space. 'DB01' is low on log volume space [C:\]. Current=61.62 GB, Threshold=175.78 GB
If we click on the details tab, the XML format can show additional information.
TL;DR – Fix This Already
Clearly this server does not have the amount of free space that the monitor expects by default. We can use an override to adjust the monitor's threshold. Overrides can be set at a global or per server level. The cmdlets are Add-GlobalMonitoringOverride and Add-ServerMonitoringOverride respectively.
We can use either duration or ApplyVersion to determine how the override is to be applied. Note that using ApplyVersion will make it permanent.
One other item to note is the item specified in the Identity parameter is case sensitive. Normally not an issue in Windows, but this is one of those relatively rare occurrences.
In the example below, we will add a global override to apply version 15.0.1497.2 of Exchange. This is the initial release of Exchange 2013 CU23 without any of the subsequent security updates. You can see the full Exchange server version history here.
Add-GlobalMonitoringOverride -Item Monitor –Identity MailboxSpace\StorageLogicalDriveSpaceMonitor -PropertyName MonitoringThreshold -PropertyValue 15 -ApplyVersion 15.0.1497.2
Managed Availability Details
If you want to look at the details of Managed Availability, they are included below for reference.
Let's start with the health of the MailboxSpace healthset:
Get-ServerHealth –Identity TO-Exch-2 –HealthSet MailboxSpace
Then we can get into the details of the Monitored Item Identy that has the issue, In this case we are focusing on the StorageLocigalDriveSpaceMonitor.
Get-MonitoringItemIdentity -Server TO-Exch-2 -Identity MailboxSpace | where {$_.name -match "StorageLogicalDriveSpaceMonitor"}
Then we can look at the status of the MailboxSpace on the server with the issue:
Get-MonitoringItemIdentity -Server TO-Exch-2 -Identity MailboxSpace
If we then want to look at details for MailboxSpace\DatabaseSizeMonitor\DB01
Get-MonitoringItemHelp -Server TO-Exch-2 -Identity "MailboxSpace\DatabaseSizeMonitor\DB01"
Finally, what are the details for the Managed Availability probe:
(Get-WinEvent -LogName Microsoft-Exchange-ActiveMonitoring/ProbeDefinition | % {[XML]$_.toXml()}).event.userData.eventXml | ?{$_.Name -like "*space*"}
Cheers,
Rhoderick