versaSRSServiceMonitor

Video Tutorial

Overview

The versaSRSServiceMonitor is a Windows Service that monitors the other versaSRS Services. The Service Monitor is configured in the VersaSRSServiceMonitor.exe.config file, which by default is located at C:\Program Files (x86)\VersaDev\versaSRS\versaSRSServiceMonitor\VersaSRSServiceMonitor.exe.config.

The Service Monitor can automatically restart a stopped service and also send failure and success notifications using an SMTP or EWS account.
Note: The Service Monitor uses an SMTP or EWS account specified in the versaSRS Global Settings to send the notification emails.

The following settings can be configured for the Service Monitor:

Key Details
CustomServiceName Optional - shows the custom service name for the Service Monitor that was defined when installed.
Refresh How often (in seconds) should the Service Monitor refresh and check the services.
DBDateFormat Defines the database date format.
ErrorThreshold The Number Of Times A Given Monitored Service Can Fail. If This Is Exceeded The Service Will Not Be Restarted (assumes RestartFailedService = 1)
ErrorThresholdReset The Number Of Times The Monitor Must Successfully Check A Given Service Before The Error Count For The Service Is Reset Back To Zero
FinalRestart The Number of Seconds To Wait After ErrorThreshold has meet, before final restart (Default 1 hour)
ServiceThreshold The number of seconds that the timestamp for the service needs to be out by in order to trigger a restart.
RestartFailedService Specifies whether to restart a stopped service or not.
DiskSpaceThresholdWarning Percentage when the disk space threshold should be noted in statistics. This is only enabled when "EmailStatistics" is enabled.
DiskSpaceThresholdCritical Percentage when the disk space threshold should be noted in statistics for critical usage. This is only enabled when "EmailStatistics" is enabled.
LogApplicationPoolUsage Define the list of application pool to check separated by ",". 0 is disabled.
LogDiskUsage Specify whether to log Disk Space Usage or not. 0 for false and 1 for true.
LogMemoryUsage Specify whether to log Memory Usage or not. 0 for false and 1 for true.
EmailStatistics Every "x" seconds send an email of the statistics about the services memory and last timestamp. 0 is disabled.
NumLinesMessage Include the last "value" of lines the log file, where the error occurred. Embedded in the notification email.
MailTemplate The Mail Template XML file to use for outgoing email notifications that get sent for stoppages and successes.
MailFrom The From address to send the notifications from. The Service Monitor uses an SMTP or EWS account specified in the versaSRS Global Settings to send the notification emails.
versaSRSMailInServiceName Shows the name of the MailIn Service that is to be monitored. Can be a custom name defined upon install of versaSRSMailIn.
versaSRSMailOutServiceName Shows the name of the MailOut Service that is to be monitored. Can be a custom name defined upon install of versaSRSMailOut.
versaSRSSchedulerServiceName Shows the name of the Scheduler Service that is to be monitored. Can be a custom name defined upon install of versaSRSScheduler.
versaCRMMailInServiceName Shows the name of the CRMMailIn Service that is to be monitored. Can be a custom name defined upon install of versaCRMMailIn.
versaCRMMailOutServiceName Shows the name of the CRMMailOut Service that is to be monitored. Can be a custom name defined upon install of versaCRMMailOut.

With default settings the Service Monitor will check the services every 40 seconds and if they have not updated for 10 minutes it will attempt a restart and send a failure notification. If the service fails 3 times in a row (ErrorThreshold) within 10 minute intervals (ServiceThreshold) then it will not attempt another restart until the Final Restart (FinalRestart) 1 hour later. If the service is stopping again after the restart, it may require manual intervention to see what is the cause of the stoppage.

To change and set addresses for the recipients of the notification alerts, edit the EmailTemplates.xml (default location C:\Program Files (x86)\VersaDev\versaSRS\versaSRSServiceMonitor).