LogicMonitor seeks to disrupt AI landscape with $800M strategic investment at $2.4B valuation to revolutionize data centers.

Learn More

Email Service Monitoring

Last updated on 30 September, 2024

LogicMonitor offers email service monitoring for health metrics, including round-trip time and transit time.

Requirements

Adding Monitoring for Email Round-Trip Time

  1. From the LogicMonitor Resources page, navigate to the resource that you want to monitor.
  2. Select the Info tab and then select Settings.
  3. Add email_rtt as a value to the system.categories property. For more information, see Resource and Instance Properties.
  4. Add the following email service connectivity information as custom properties for the resource:
PropertyValueExample
smtp.hostHostname of the SMTP servicesmtp.gmail.com
smtp.typeSMTP security type: blank/SSL/TLSSSL
imap.hostHostname of the IMAP serviceimap.gmail.com
imap.typeIMAP security type: blank/SSL/TLS/OAuthTLS
email.userUser ID required for account authenticationtestuser
email.passPassword required for account authenticationhello123
email.addrThe email address for the account[email protected]

Note: Measurements are taken from the perspective of the collector that is assigned to monitor the resource. Messages are sent and retrieved from the device’s collector, and not the device itself. You can apply the DataSource to the server that the Collector is installed on (if it has been added into monitoring), or you can apply the DataSource to any other monitored device.

Adding Monitoring for Email Transit Time

  1. Navigate to the resource that you want to monitor.
  2. Select the Info tab and then select Settings.
  3. Add email_transit to the system.categories property. For more information, see Resource and Instance Properties.
  4. Add the following custom properties for the email services that you’re monitoring. For example, if you’re measuring email transit time between a Gmail account and a Microsoft Office 365 (O365) account:
ServicePropertyValueDescriptionExample
Gmailtransit.gmail.imapHostIMAP hostnameGmail retrievalimap.gmail.com
Gmailtransit.gmail.imapTypeIMAP encryption typeGmail retrievalSSL (port 993)
Gmailtransit.gmail.smtpHostSMTP hostnameGmail deliverysmtp.gmail.com
Gmailtransit.gmail.smtpTypeEncryption type for SMTP serviceGmail deliveryBlank (port 25)
SSL (port 465)
TLS (port 587)
Gmailtransit.gmail.addrEmailEmail address for the Gmail account[email protected]
Gmailtransit.gmail.userUser IDUser ID for the Gmail account[email protected]
Gmailtransit.gmail.passPasswordPassword for the Gmail accountP@ssw0rd
O365transit.o365.imapHostIMAP hostnameO365 retrievalimap.o365.com
O365transit.o365.imapTypeIMAP encryption typeO365 retrievalSSL (port 993)
O365transit.o365.smtpHostSMTP hostnameO365 deliverysmtp.o365.com
O365transit.o365.smtpTypeEncryption type for SMTP serviceO365 deliveryBlank (port 25)
SSL (port 465)
TLS (port 587)
O365transit.o365.addrEmail addressEmail address for the O365 account[email protected]
O365transit.o365.userUser IDUser ID for the O365 account[email protected]
O365transit.o365.passPasswordPassword for the O365 accountP@ssw0rd

Note: A key is the section of the property that identifies the service. For example, transit.gmail.smtpHost. These must be consistent across each service.

Adding Monitoring Instances for Email Transit Time

To monitor email transit time, create instances for each transit direction.

  1. From the LogicMonitor Resources page, navigate to the Email_TransitTime DataSource.
  2. From the Manage Device menu, select Add Monitored Instance.
  3. From the Add Monitored Instance page, enter the Name and Wildvalue information, based on the following example:
    • Name: Gmail > O365
    • Wildvalue (sender:receiver): gmail:o365
    • Instance Group: @default
  4. Select Save.
  5. Return to the Resources page and create a second monitored instance for the Email_TransitTime DataSource, based on the following example:
    • Name: O365 > Gmail
    • Wildvalue (sender:receiver): o365:gmail
    • Instance Group: @default
  6. Select Save.

Note: In the Wildcard Value field, the colon-separated keys must match the keys used to represent the sending and receiving services.

Sample Evaluation Process for Email Transit Time

The process for evaluating Email Transit Time, using Gmail and Office 365 as an example:

StepProtocolDescriptionExample
1SMTP Deliver a message from the collector to Provider A.Collector > Gmail
2SMTP Provide a destination address to Provider B.Gmail > Office 365
3IMAPGet the message back to the collector.Office 365 > Collector

This process highlights two components of email service monitoring:

  • The time it takes messages sent from an email server to be delivered externally.
  • The time it takes messages sent externally to make it to an inbox.

Note: The Email Transit Time DataSource contains an ErrorCode datapoint to show where any errors may have occurred.

Error Codes

The applicable error codes are as follows:

Error CodeMeaningDescription
-2Invalid instanceUnable to locate a valid service.
-1Missing paramsBasic parameters, such as username and password, were not available to properly validate transit time.
0OKThe roundtrip validation was successful.
1SMTP connection failureThe collector can not connect to the SMTP server.
2SMTP send failureConnected to the SMTP server and attempted to send a message, but the server did not accept the message.
3IMAP connection failureUnable to connect to the destination server hosting the inbox that contains the message. Typically due to an incorrect hostname, user ID, or password. Or, the specified security type is incorrect.
4IMAP search failureUnable to retrieve the unique message at the destination server.Note: Each time the Email_TransitTime DataSource runs, it generates a message with a unique subject line. In order to validate the round-trip/transit time, the message must be retrieved from the IMAP server. 
5IMAP close failureUnable to properly terminate the IMAP connection.

Diagnostic Logs

Diagnostic logs for DataSources are enabled by default, and can be found in the collector’s logs directory:

  • /usr/local/logicmonitor/agent/logs
  • C:\Program Files (x86)\LogicMonitor\Agent\logs
LogsStored AsDescription
ProtocolEmail Round-Trip Time:
[hostname]-emailRTT-protocol.logEmail Transit Time:
[hostname]-[instance]-emailTransit-protocol.log
Protocol logs show the underlying SMTP and IMAP commands issued by the collector and the corresponding responses by the target server(s).Note: These may require advanced level understanding of SMTP and IMAP protocols.
DebugEmail Round-Trip Time:
[hostname]-emailRTT-debug.logEmail Transit Time:
[hostname]-[instance]-emailTransit-debug.log
Debug logs show telemetry of the DataSource itself, indicating what steps have been attempted, succeeded or failed.

Email Service LogicModules

The email service monitoring DataSources are Email Round-Trip Time and Email Transit Time. For more information, see Installing Modules and Packages

NameTypeDescription
Email_RoundTripDataSourceMeasures the time taken to deliver a given message from the collector to an SMTP service, along with the time to retrieve the same message from the corresponding IMAP service. The LogicMonitor collector acts as a desktop email client:Sends outgoing messages using your SMTP service.Retrieves that same message from your IMAP service.The time to complete each step in the round-trip transaction is measured and reported. For example, any latency within your network or in the message handoff between your SMTP service, message store, and IMAP service.
Email_TransitTimeDataSourceMeasures the time taken to collect an email sent from one service to another. This can help to determine whether your email service is properly delivering and accepting messages from other service providers. Email Transit Time uses two protocols:SMTP to send messages from a client to a server.IMAP to retrieve messages from the server to a client.
Office365_Email_OAUTHDataSourceCheck for and gathers tokens for Office 365 OAuth. Requires application registration and credentials set:office365.clientidoffice365.clientsecret.passoffice365.tenantidFor more information, see Microsoft 365 OAuth Email Monitoring.
In This Article