EventSmith Services

EventSmith is the alarm notification system that processes any events generated by CM4D Scheduler. EventSmith uses two Windows services to process events from reports and send out event notifications from CM4D:

  • ATS CM4D EventSmith Mailer - Processes the email notifications via the SMTP mail server for CM4D Scheduler Event jobs. This service is dependent on the EventSmith Processor.
  • ATS CM4D EventSmith Processor - Processes the events generated by CM4D Scheduler.

The EventSmith services require the following:

  • SMTP Mail Server Configuration - A mail server is required to send the email notifications from EventSmith SMTP. You need to set the server information and the user login that will be used for authentication. Configure in either SiteManager (desktop app) or the CM4D Configuration plugin (web app).
  • CM4D Site database access - If the services are installed on the same machine as CM4D Server, database access is obtained via the Cm4d.4ds file. For installs on a separate system, a database connection string can be configured in the appsettings.json files for each service.

Configure SMTP Mail Server

A mail server is required to send the email notifications from EventSmith SMTP. You need to set the server information and the user login that will be used for authentication.

The mail server can be configured either in SiteManagerSiteManager or via the CM4D Configuration pluginCM4D Configuration plugin.

Site Manager menu: Settings > EventSmith SMTP Settings

CM4D Configuration plugin: EventSmith > Settings

Enter the following information:

  • SMTP Host - The server address of the SMTP mail server.
  • Port - The port number used to connect to the SMTP mail server. It must match the SMTP port used on your mail server.
  • Enable SSL - Check this option if the mail server requires SSL.
  • Username - The username that will be used to log in to Authenticate on the mail server. For anonymous relay, leave this empty.
  • Password - The password for the Authentication user name. For anonymous relay, leave this empty. The password is encrypted in the database.
  • From Address - The email address from which the event notifications are sent. If this is left empty, EventSmith will attempt to obtain an address from the Site database based on the user running the service. If neither exist, the service will not start. If you are using Authentication, the from address should match the account used to log in to the SMTP server or it will likely fail to send any email.

Once the services are started, you can look at the entries in the Windows Event Viewer to see which mode (authentication or anonymous) is running.

Configure EventSmith Services

Services Log On User

The EventSmith services should be run by a specified user account.

  1. Go to Administrative Tools > Services.
  2. Right-click a service and select Properties.
    1. Go to the Log On tab.
    2. In the Log on as section, select This account.
    3. Enter the User credentials for the user account that will run the CM4D service.
    4. Click OK.
  3. Repeat for each CM4D Service.
  4. Once all CM4D services are configured, close Services.

If your Domain users are required to change their passwords periodically, you will also need to update the CM4D services Log On passwords manually. The Windows service logon passwords do not get updated automatically through the Windows change password operation.

CM4D Site database access

If the services are installed on the same machine as CM4D Server, database access is obtained automatically via the Cm4d.4ds file registered to the CM4D installation. This method allows your passwords to remain encrypted.

For services installed on a separate system, a database connection string is configured in the appsettings.json files for each service.

  • EventSmith Mailer AppSettings Default Path.\Applied Tech Systems\ATS CM4D EventSmithV2\Mailer\appsettings.json
  • EventSmith Processor AppSettings Default Path.\Applied Tech Systems\ATS CM4D EventSmithV2\Event Queue Processor\appsettings.json

The database connection setting "ConnectionStrings" is the same for both services: "SiteDbConnection": "Server=(local)\\MSSQLSERVER01;Database=cm4dsite;User Id=cm4dservice;Password=xxxxx"

Change this:

  "ConnectionStrings": {
    "SiteDbConnection": ""
  }

To this: 

  "ConnectionStrings": {
    "SiteDbConnection": "Server=(local)\\MSSQLSERVER01;Database=cm4dsite;User Id=cm4dservice;Password=cm4d!"
}
 

If your database connection includes an instance name, add a second backslash character between the server and instance name to conform with SQL Server syntax requirements.

Run EventSmith Services

  1. Open Control Panel > Administrative Tools > Services.
  2. Start the two EventSmith services - Mailer and Processing.

Install and Configure ServiceControl Manager

NServiceBus (used by CM4D Results and EventSmith services) provides powerful error handling and monitoring tools:

  • ServiceControl - Collects data from endpoints (CM4D Services).
  • ServicePulse - A web-based application to inspect failed messages and resubmit them and to monitor the availability and performance of endpoints.
  • ServiceInsight - Supports auditing of message details but has a major performance impact.

At a minimum, it is strongly recommended to use ServiceControl and ServicePulse. You need to configure at least one instance of ServiceControl and one Monitoring instance for the transport method chosen during the installation of the Results service.

It is highly recommended to install monitoring services on a different machine from the Results services to ensure maximum processing power for the Results services.

See the topic Configure ServiceControl Manager for more details.

 


Can we improve this topic?