cancel
Showing results for 
Search instead for 
Did you mean: 

Query to check SMTP Archiving Backlog & Queue Status

arnoldmathias
Level 4

Hi All

Is there any query handy to check the backlog in SMTP Archiving i.e. item count increasing in the SMTP Holding Folders? I believe there are no events which capture the backlog (unlike the event 3229 for Journal Archiving backlog).

I am currently making use of the following Powershell query to check the number of items in the holding folder at the moment to send an email alert. 

$Sender = "sender@domain.local"
$Recipient = "recipient@domain.local"
Get-Content C:\Reports\ps\All_SMTP_Servers.txt | foreach {
$TempVar = invoke-command -computername $_ -scriptblock {
Function DirectoryCount ($directory) {
foreach ($file in Get-ChildItem $directory -Recurse -Directory){[pscustomobject] @{'DirectoryName' = $File.FullName;'FileCount' = (GCI $File.FullName -Recurse).Count}}
}
DirectoryCount "YourDrive:\FolderName\SMTPHoldingFolder\" | foreach {if ($_.FileCount -gt "0") {if ($_.DirectoryName.tostring().Split("\").GetUpperBound(0) -ge "4"){$out = $_.DirectoryName + "," + $_.FileCount;$out;$out=""}}}
}
$TempVar = $TempVar | out-string
Send-MailMessage -From $Sender -To $Recipient -Subject "SMTP Queue Status" -priority High -SmtpServer SMTPServerName -body $TempVar
$TempVar=""
}

3 REPLIES 3

GertjanA
Moderator
Moderator
Partner    VIP    Accredited Certified

Hello,

The SCOM pack for EV (12.2) contains monitors specific for SMTP. These migh be available in 11.x also.

https://www.veritas.com/support/en_US/article.000024822

Regards. Gertjan

Thank you @GertjanA

While this does provide statistics on disk space utilised and if the holding folder is reachable, it doesn't give an alert if it has stopped processing new .eml files (i.e. archiving has stopped) or the time of the last archived .eml file.

In one scenario, we had the SMTP service and the task running (configured for monitoring in SCOM) but the count of .eml files was continuing to increase and we weren't monitoring that.

You're going to have to use the PowerShell script if you specifically want a count of the number of .eml files in the folder. However, we do provide enough performance counters that you can do better than just "is the folder reachable?" and "how much disk space is used?".

Consider the Performance Counters in the Enterprise Vault SMTP Service, Enterprise Vault SMTP Archiving Task, and Enterprise Vault SMTP Holding Folder sets.

\enterprise vault smtp archiving task(smtp archiving task)\smtp messages archived
\enterprise vault smtp archiving task(smtp archiving task)\smtp messages unable to archive
\enterprise vault smtp archiving task(smtp archiving task)\smtp messages processed
\enterprise vault smtp archiving task(smtp archiving task)\smtp messages original size (bytes)
\enterprise vault smtp archiving task(smtp archiving task)\maximum original size of smtp messages (bytes)


\enterprise vault smtp service\smtp messages original size (bytes)
\enterprise vault smtp service\connections rejected
\enterprise vault smtp service\concurrent connections
\enterprise vault smtp service\smtp messages rejected
\enterprise vault smtp service\smtp messages received


\enterprise vault smtp holding folder(c:\evstorage\smtpholding)\disk space % used
\enterprise vault smtp holding folder(c:\evstorage\smtpholding)\connectivity

You can monitor any of these in your script using the Get-Counter cmdlet. This way, you could monitor the number of SMTP messages received and the number of SMTP messages processed, and if the two ever get too distant from each other, then raise your alert. Additionally, you could alert on specific thresholds of messages rejected by the SMTP endpoint or unable to be archived. Counting the number of .eml files is a fine proxy for "is my SMTP task working?" but the point is that you can be more detailed than that if you want to be.

 

--Chris