Monitoring Hub Transport Server

Monitoring the queue is one of the important tasks in the Daily Exchange Server Check list.

  I have identified and modified a script for monitoring the Transport Queues on all the Hub servers .I have tested this output. This script runs on all hub servers and then it triggers an output email to the given recipients. Below are the screenshots and the script which will be helpful to us in terms of monitoring the Queue in the exchange 2007 & 2010.

Image    

Output of the HTML result.

Image  

Also this can be sent to a recipient email address and here is the  sample output of an test performed ‘

 

Image  

 

Below is the Script file 

 ***************************************************************************

 

$Msg = new-object system.net.mail.MailMessage

 

$msg.IsBodyHtml = $True

 

$msg.Body = $Queue

 

$msg.Subject = “Hub Transport Queue Information”

 

$msg.To.add(“Sathish@exchangequery.com”)

 

$msg.To.add(“Administrator@exchangequery.com”)

 

$msg.From = “Sathish@exchangequery.com”

 

$SmtpClient = new-object system.net.mail.smtpClient

 

$smtpclient.Host = ‘testlab.exchangequery.com’

 

$smtpclient.Send($msg)

 

 

$Queue = Get-TransportServer | Get-Queue | Select Identity,DeliveryType,Status,MessageCount,NextHopDomain,LastRetryTime, NextRetryTime | ConvertTo-Html -head $BodyStyle

 

 

$BodyStyle | Out-File C:\scripts\QueueInfo.html

 

$BodyStyle = “<style>”

 

$BodyStyle = $BodyStyle + “BODY{background-color:peachpuff;}”

 

$BodyStyle = $BodyStyle + “TABLE{border-width: 1px;border-style: solid;

border-color: black;border-collapse: collapse;}”

 

$BodyStyle = $BodyStyle + “TH{border-width: 1px;padding: 0px;

border-style: solid;border-color: black;background-color:thistle}”

 

$BodyStyle = $BodyStyle + “TD{border-width: 1px;padding: 0px;

border-style: solid;border-color: black;background-color:PaleGoldenrod}”

 

$BodyStyle = $BodyStyle + “</style>”

***************************************************************************

 

 

 

 

 

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: