KB Article #101106
Monitoring EMF mail queues.
Detailed Information:
EMF provides a built in facility to monitor the message queues such as quarantine, retry, inbound, etc. In the 6.x Web Admin Queues page, select Setup for the corresponding queue. In EMF 5.x, alternatively, you can go into the queue and select the "setup queue" button.
The mail queues are strictly stored in SQL, and the monitoring facilities provided are different then they were in EMF 4.7. The ability to set notification or log events to the EMF Event log is now built into the product. Performance Monitor counters for the queues are not available as they were in 4.7.
The built in facility to monitor the queues is driven by a SQL Stored Procedure. This stored procedure can be modified to log an SQL event to the Windows Application log. In turn, 3rd party software can be configured to trigger alerts based on this event. The stored procedure that monitors the queues is called: 'mmsSpQueueThresholdActions'.
This is not an official solution see below.
The stored procedure can also be modified to send a message to one or more workstations using the NET SEND command. Your environment must allow for this to work however (NetBios enabled). Try running NET SEND from a command prompt on the EMF database server first to be sure it works.
IF YOU ARE NOT FAMILIAR WITH MODIFYING SQL STORED PROCEDURES - S T O P - AND OBTAIN THE HELP OF A DBA.
Open for editing the stored procedure 'mmsSpQueueThresholdActions' and add only the lines in bold font. The lines get added about 3/4 of the way to the bottom of the default stored procedure, the lines not in bold indicate the exact location where the lines in bold should be added. Note the location is after "IF @eventID IS NOT NULL". This is the part of the code where the event gets logged to the EMF Event Log, the code you are adding is simply additional actions to take when the correct criteria is met.
NOTE that your queue set up configuration must Log an Event for any of these actions to take affect.
IF @eventID IS NOT NULL
BEGIN
  --this is a hack - log to Windows application log
    exec SP_AddMessage 50005, 10, N'Queue Threshold has been met', @with_log = 'TRUE', @replace = 'REPLACE'
    RAISERROR (50005, 10, 1)
  --Send message to workstation - replace 'computername' with the
  --name of the workstation that you want to receive the message
    EXEC Master..xp_cmdshell 'NET SEND computername Queue Threshold has been met'
--end hack
INSERT INTO
[EventLogEvents]
(
[eventID],
[eventMachine],
[eventType],
[eventLevel],
[eventCategory],
[componentName],
[eventClassID],
[eventClassDescription],
[eventDetails]
)
READ!!!
****************************************************
THIS HAS NOT BEEN TESTED BY QA AND IS NOT OFFICIALLY SUPPORTED BY TUMBLEWEED. IT IS BELIEVED TO WORK AS OF 5.0 P3, AND IT IS LIKELY THAT ANY UPGRADE WILL OVERWRITE THESE CHANGES. IT IS ALSO VERY LIKELY THAT TUMBLEWEED WILL CHOOSE TO ADDRESS THIS DIFFERENTLY IN A FUTURE RELEASE AND ANY WORK TO 3RD PARTY SOFTWARE MAY NEED TO BE REDONE. PROCEED AT YOUR OWN RISK.
****************************************************
Additional Information:
There are a number of main-stream tools used in the Enterprise to monitor the Windows event log such as NetIQ, Tivoli, HP OpenView, Compaq Insight Agent, and others. Tumbleweed support has also searched the Internet for free and inexpensive utilities for monitoring the Windows Application log. Below are some of the results of our search. Tumbleweed does not make any claims to the usefulness or reliability of any of the utilities listed below - we know nothing about any of them. The links are provided only as a convenience.
Free
http://docs.aspfree.com/quickstart/howto/doc/LogMonitor.aspx
http://www.freedownloadscenter.com/Network_and_Internet/Network_Management_Tools/ipMonitor_V6.html
Pay Programs (most 30-day demos)
http://www.sccusa.com/tnt_eventLog.htm
http://www.eventalarm.com/features.htm
http://www.advtoolware.com/t4e/monitor/monitor_default.htm
Please see related article EMF Monitoring Techniques on the right.