1 Reply Latest reply on May 10, 2018 8:34 AM by chad.every

    Exchange Monitoring ?

    hansons

      Hi All,

       

      I have been asked to monitor and alert on the size of a specific mailbox and one of its sub folders, anyone come across this before ?

       

      I can get the information I need from the exchange management shell by running the following

       

      Get-MailboxFolderStatistics BSmith -FolderScope Inbox | select Name,FolderSize,ItemsinFolder

       

       

      just not sure how to pull the data in to SAM and then alert on this

       

      as always any help greatly appreciated

       

      Hans

        • Re: Exchange Monitoring ?
          chad.every

          If you are already using the AppInsight for Exchange template then you should be able to alert off the total mailbox size. I do not believe it is granular enough to alert on a specific folder inside of the mailbox.

           

          As far as a custom powershell script, this would be the base of it. You'd want to add in error checking and validation stuff.

           

           

          Params ([String]$MailboxName)

           

          $Output = Get-MailboxFolderStatistics $MailboxName -FolderScope Inbox

           

          Write-Output "Statistic.FolderSize: $($Output.FolderSize)"

          Write-Output "Statistic.ItemsinFolder: $($Output.ItemsinFolder)"

           

           

           

          In SAM, when you add a powershell component monitor, you'll paste the script into the Script Body section and then update the Script Argument section with the mailbox in question.

           

           

          Once the script is tested once, it'll show the threshold settings below the screenshot above where you and set values for warning and critical.

           

          This is an article that I wrote a while back that does into detail on the requirements for custom scripts.

          SAM Script Component Monitors - Everything you need to know