Skip to content

Email notifications

Two parts of SQDR can email you when something needs attention:

  • The Replicator Service emails replication events, such as a failed group run or a paused incremental group. You set it up in the Data Replicator Manager.
  • Each Capture Agent (Stelo Capture) emails its severe (and optionally warning) log messages, such as a failed worker, a paused log reader or congestion. By default it uses the Replicator Service's email settings, so you set up email once.

Replicator Service

The Notification tab of Service Settings › Properties sets how the Replicator Service sends email; Email under Severity Levels on the Logging tab sets which events are emailed.

Message types

  • Turning Email notifications off keeps the settings, for example to stop emails during maintenance.
  • Suppress repeated messages for (default 15 minutes; 0 never suppresses): increase it if a recurring problem floods your mailbox.

Email properties

Microsoft Graph API (Microsoft 365) and GMail REST API (Google) send with OAuth 2.0. Changing Sender Method clears the other method's fields.

With SMTP, From can be any valid address: use it to tell services apart, for example [email protected]. Send Test Email uses the values on screen (saved or not) and shows the mail server's answer, including the SMTP conversation.

With Microsoft Graph API or GMail REST API, you register an application with Microsoft Entra ID or Google Cloud and enter its details.

Option What to know
Tenant ID The endpoints are filled in from it.
Authorized Email Address The mailbox that should send the email. It's passed to the sign-in page only as a hint, to preselect the account: email is always sent from the account that signs in during Authorize. Sign in with this mailbox.
Authorization Endpoint, Token Endpoint, Scope, Redirect URI The provider's OAuth 2.0 settings, filled in with its defaults. The Redirect URI is the address you open the Data Replicator Manager at, followed by /oauth/callback (the default, for example https://replmgr.example.com/oauth/callback); register exactly that with the application. With Microsoft Entra ID, register it under the platform Web, not Single-page application (which limits the refresh token to 24 hours, so email stops after a day). The endpoints must be the provider's own sign-in and token addresses.
Authorize Opens the provider's sign-in in a pop-up window (allow pop-ups for the Data Replicator Manager). It needs the Data Replicator Manager opened over HTTPS (or on localhost), at the Redirect URI's address. After you sign in and consent, click Save in the message to store the token with the service.

Changing any of these fields requires a new Authorize; afterwards the service renews the token by itself.

Capture Agents

A Capture Agent emails its SEVERE (and optionally WARNING) log messages, with the Replicator Service's email settings (the default for new agents) or its own SMTP settings.

How it works

The agent emails every log message at or above its notification level as it logs it. Two settings decide what is sent:

  • Level: NotificationLevel. OFF sends nothing; SEVERE sends errors only; WARNING also sends warnings such as congestion. A lower level (such as FINE) is raised to INFO. The agent's logLevel applies first: a message the agent doesn't log isn't emailed.
  • Where and how: with commonEmailConfig=true, the agent uses the Replicator Service's (SQDR) email settings, set up in the Data Replicator Manager. Otherwise it uses its own SMTP settings (SmtpServer, to, from and, if needed, mailUser, mailPassword and mailOptions).

The agent reads its own settings when it starts. If a required setting is missing, it logs a warning (Unable to create CustomerMailHandler) and doesn't send email.

With commonEmailConfig=true, the agent reads the Replicator Service's email settings again when it has a message to send, at most once a minute, so a change in the Data Replicator Manager applies without restarting the agent. If the settings can't be read yet (for example, SQDRC isn't available when the agent starts, or email isn't set up on the Replicator Service), the agent logs the warning Email notification is not ready yet with the reason, and tries again at most once a minute. If SQDRC can't be reached later, the agent keeps the settings it read last.

Steps

Using the Replicator Service's email settings

  1. In the Data Replicator Manager, set up email on the Replicator Service that uses this Stelo Capture server (see Replicator Service), and check it with Send Test Email. SMTP, Microsoft Graph API and GMail REST API all work for Capture Agents.
  2. In the SQDR Control Center, on the Logging step of Add Capture Agent, keep Use Email Configuration from Replication Manager. checked and choose an Email Notification Level. For an existing agent, set commonEmailConfig to true and NotificationLevel on its Configuration tab.

The agent reads the settings from the Replicator Service's control database (SQDRC), in the same Db2 instance as its staging database; the level still comes from the agent. A list of recipients (separated by , or ;) in the Replicator Service's settings works with SMTP, Microsoft Graph API and GMail REST API.

Using the agent's own SMTP settings

  1. On the Logging step of Add Capture Agent, clear Use Email Configuration from Replication Manager. and fill in SMTP Server Name, Email Notification Address and Email Sender Address. For an existing agent, set commonEmailConfig to false and the properties below on its Configuration tab.
  2. If the mail server needs authentication, a port other than 25, or encryption, add mailUser, mailPassword and mailOptions (see Office 365 for examples).

Changing a property on the Configuration tab restarts the agent if it's running (see Configuration).

Options

Property Wizard field What it does Default When to change it
NotificationLevel Email Notification Level The lowest level emailed: OFF, SEVERE, WARNING (and INFO on the Configuration tab). OFF in the wizard; SEVERE if the property is missing WARNING to be told about congestion too. INFO only for testing.
commonEmailConfig Use Email Configuration from Replication Manager. true: send through the Replicator Service's email settings. true in the wizard; false if missing Clear it to use another mail server than the Replicator Service.
SmtpServer SMTP Server Name The mail server, when commonEmailConfig is false. none
to Email Notification Address The recipient; separate several addresses with , or ;. none
from Email Sender Address The sender address. SqdrPlus Use a valid address; many mail servers reject others.
mailUser, mailPassword The account, if the mail server requires authentication. The password is stored encrypted. none
mailOptions JavaMail properties, separated by ;, for example mail.smtp.port=587;mail.smtp.starttls.enable=true. Without a port, port 25 is used. none For a port other than 25, TLS, or trusted certificates.
starquestNotification Send Error Notifications to Stelo Also emails messages at this level to Stelo Support. The checkbox sets SEVERE. OFF Only when Stelo Support asks.

Messages to Stelo need outgoing mail to reach Stelo's mail server. If your network blocks it, set starquestNotification to OFF.

Office 365

With the Replicator Service's settings (commonEmailConfig=true), choose Microsoft Graph API in the Data Replicator Manager; no SMTP setup is needed. With the agent's own SMTP settings, use one of these:

Method Settings Advantages Disadvantages
Direct Send SmtpServer=your-domain.mail.protection.outlook.com (your tenant's MX endpoint); mailOptions=mail.smtp.starttls.enable=true;mail.smtp.ssl.trust=your-domain.mail.protection.outlook.com No authentication; from can be any address in your domain. Can't send outside your domain; your IP address must be allowed, which complicates cloud deployments.
SMTP client submission (SMTP AUTH) SmtpServer=smtp.office365.com; mailOptions=mail.smtp.starttls.enable=true;mail.smtp.port=587;mail.smtp.ssl.trust=smtp.office365.com; mailUser and mailPassword of a licensed mailbox, with from the same as mailUser Can send outside your domain. Not compatible with Microsoft Security Defaults; SMTP AUTH must be enabled for the mailbox.
SMTP relay connector As for Direct Send, after your Office 365 administrator creates a relay connector for your static IP address in the Exchange admin center. Can send outside your domain. Needs an administrator and a static IP address used only by your organization; other devices on your network could use the connector too.

See Microsoft's article on sending email from a device or application with Office 365.