Unable to receive the email from an Automation Policy that uses a report that returns a large number of rows
search cancel

Unable to receive the email from an Automation Policy that uses a report that returns a large number of rows

book

Article ID: 220245

calendar_today

Updated On:

Products

IT Management Suite Client Management Suite

Issue/Introduction

The customer reported the following scenario:

  1. I have a report that returns 498,655 rows and can be exported from the SMP Console page.
  2. I have created an automation policy to email this to me as a csv file and it is not working. I have others that work fine.
  3. I started narrowing down the issue by adding "Select TOP 10' to the query for this report and that actually worked and I received an email.
  4. This has worked all the way to 360,000 (so "Select TOP 360000") and that works but if I go any higher, never receive an email.

Environment

ITMS 8.x

Cause

After capturing a profile trace, we found out that the actual size for the csv file was too big. The actual email for this automation policy is sent but due to the size of csv file, their email server (SMTP server may have some sort of attachment size allowances) is not sending it to their destination. 

In this particular instance, we didn't see any errors in NS logs or Profiler during our process of sending the Automation Policy and its content. The email seems to be sent just fine, the size was 155.656.660 bytes.

Resolution

Log entries with email details, including total size have been added to our ITMS 8.6 RU2 release. There is also a new core setting that can be used to enable this extra log information:

  • core setting to adjust verbosity: SMTPEmailSizeLogLevels
  • default value (megabytes) = "5, 10,20" (verbose / info / warning)

How to enable this setting:

  1. On the SMP Console, go to Settings>Notification Server>Core Settings 

  2. Search for SMTPEmailSizeLogLevels and select the desired values (5=verbose logging, 10=informational, 20=warning)

Sample messages in NS log:

Sending email ('A report has been generated by an automation policy' ([email protected])): prepared, size=7.55 MB, attachments=2, via=192.19.211.199:25, timeout=100000, [email protected], elapsed time=00:00:01.4737987

Sending email ('TEST AUTOMATION POLICY FROM ITMS(BIG DATA)' ([email protected])): prepared, size=5.35 MB, attachments=1, via=192.19.211.199:25, timeout=100000, from=""[email protected]"" <[email protected]>, elapsed time=00:00:00.5819999","MailStdScripting","AtrsHost.exe","102","Verbose"

Note:

If there is a need to send such a large file, please refer to KB 219364 "How to send attachment in the Automation Policy e-mail?" in order to send the file as a Zip file instead. Hopefully, that will reduce the file size and be under the email server file size allowed attachments size.

Additional Information

219364 "How to send attachment in the Automation Policy e-mail?"
162988 "Send CSV results as attachment in the Automation Policy e-mail"