Exchange 2007–A Queue Monitoring Console simply built

 

Using my DTW (Document-Tool-Walkthru) Excel based tool that you can download through : https://www.opsvault.com/how-to-build-a-simple-and-efficient-windows-monitoring-solution-dtw/

 

Here is a nice HTA console quickly built with the above Excel tool that I called “DTW” tool :

image

 

And here is the code generated with the help of my DTW. Copy and paste the below code into a notepad that you save as “LocalQueueMonitor.hta”.

The below generated HTA file will only run on a local Exchange 2007 server, but the DTW enables you to easily build a console that will run against remote server(s). Plus, you can play with the “Console initialization parameters” as you want to customize the look and feel and behaviour of your console !

Here is the code, generated by the DTW tool, and that will to generate an HTA file that will monitor the local Exchange 2007 server queues:

<HTML>
<BODY BGCOLOR=#C0C0C0>
<OBJECT
CLASSID="clsid:C4D2D8E0-D1DD-11CE-940F-008029004347"
ID="Monitor"
HEIGHT=80%
WIDTH=100%>
</OBJECT>

<SCRIPT LANGUAGE="VBScript">

Sub Window_OnLoad
On Error Resume Next

' Console initialization
Monitor.DisplayType = "1"
Monitor.ReportValueType = "0"
Monitor.MaximumScale = "100"
Monitor.MinimumScale = "0"
Monitor.ShowLegend = "1"
Monitor.ShowToolbar = "1"
Monitor.ShowScaleLabels = "1"
Monitor.ShowHorizontalGrid = "1"
Monitor.ShowVerticalGrid = "1"
Monitor.ShowValueBar = "1"
Monitor.ManualUpdate = "0"
Monitor.Highlight = "1"
Monitor.ReadOnly = "1"
Monitor.MonitorDuplicateInstances = "1"
Monitor.UpdateInterval = "1"
Monitor.DisplayFilter = "1"
Monitor.BackColorCtl = "-2147483633"
Monitor.ForeColor = "-1"
Monitor.BackColor = "-1"
Monitor.GridColor = "8421504"
Monitor.TimeBarColor = "255"
Monitor.BorderStyle = "2"
Monitor.TimeAxisLabels = "1"
Monitor.Tooltip = "1"
Monitor.NextCounterColor = "4"
Monitor.NextCounterWidth = "0"
Monitor.NextCounterLineStyle = "0"
Monitor.MaximumSamples = "200"
Monitor.GraphTitle = "CPU and Submission queues"
Monitor.YAxisLabel = "Y label"
Monitor.DigitGrouping = "1"
Monitor.WrapTimeLine = "1"
Monitor.DataSourceType = "1"
'Monitor.SqlDsnName =
'Monitor.SqlLogSetName =
Monitor.LogFileCount = "0"
Monitor.AmbientFont = "1"
'Monitor.LegendColumnWidths =
Monitor.LegendSortDirection = "-2"
Monitor.LegendSortColumn = "0"
Monitor.CounterCount = "4"
Monitor.MaximumSamples = "100"

' Counters list added to the console
Monitor.Counters.Add("\MSExchangeTransport Queues(_total)\Aggregate Delivery Queue Length (All Queues)")
Monitor.Counters.Add("\MSExchangeTransport Queues(_total)\Messages Completed Delivery Per Second")
Monitor.Counters.Add("\MSExchangeTransport Queues(_total)\Poison Queue Length")
Monitor.Counters.Add("\MSExchangeTransport Queues(_total)\Retry Mailbox Delivery Queue Length")
Monitor.Counters.Add("\MSExchangeTransport Queues(_total)\Retry Non-Smtp Delivery Queue Length")
Monitor.Counters.Add("\MSExchangeTransport Queues(_total)\Retry Remote Delivery Queue Length")
Monitor.Counters.Add("\MSExchangeTransport Queues(_total)\Submission Queue Length")
Monitor.Counters.Add("\MSExchangeTransport Queues(_total)\Unreachable Queue Length")
Monitor.Counters.Add("\Memory\Available Mbytes")
Monitor.Counters.Add("\Processor(_Total)\% Processor Time")

' Counter drawing customization
Monitor.Counters.Item(19).Color = "100"
Monitor.Counters.Item(19).Width = "4"
Monitor.Counters.Item(19).LineStyle = "2"
Monitor.Counters.Item(19).ScaleFactor = "0.001"
Monitor.Counters.Item(19).Show = "1"
Monitor.Counters.Item(19).Selected = "0"
Monitor.Counters.Item(19).StatisticStatus = "0"

End Sub

</SCRIPT>
</BODY>
</HTML>