Last Updated on
What’s New In Transact 4.5?
Logging | Log Monitoring Tool
Ephesoft Transact now offers a new system of alerts. All alerts are handled by the Log Monitoring Tool, which has been created specifically for this purpose.
The tool is responsible for monitoring application logs and generating alerts on the basis of the following factors:
|Log events||the tool keeps record of log events and alerts the system administrator if the log event is not received within a predefined timeframe|
|Log size||the tool monitors the size of the log generated by the application and alerts the system administrator if the log size crosses a predefined threshold|
|Log folder size||the tool monitors the size of the application log folder and alerts the system administrator if the log folder size crosses a predefined threshold|
|Log folder disk size||the tool monitors the size of the disk which contains the log folder and alerts the system administrator if the disk size crosses a predefined threshold|
|Connection timeout||the tool alerts the system administrator if connection to the server cannot be established within a predetermined timeframe|
|Connection error||the tool alerts the system administrator if connection to the server cannot be established due to an incorrect configuration|
|IO exception error||the tool alerts the system administrator if an error occurred while trying to monitor the log folder (e.g. when the application does not have access to the log folder)|
All alerts are sent via email.
The Monitoring Tool should be executed by the system administrator. It requires access to TCP ports and needs permission to read the size of the log folder and associated hard disk.
The tool is designed to monitor one server only. By default, it is located in the monitoring-tool subfolder of the Ephesoft application folder.
To use the Monitoring Tool:
1. Navigate to the Ephesoft application folder and open the log4j.xml file.
2. Configure the Remote Log Appender:
- Uncomment the REMOTE APPENDER section
- Specify the TCP port which will be used by the tool
- Specify the logs to be monitored
3. Navigate to the config folder of the Monitoring Tool and open the application.properties file (<Ephesoft Installation Directory>\Application\monitoring-tool\config).
4. Configure the Monitoring Tool by setting the appropriate properties. All properties are described in the table below.
|logging.file||monitor-log.log||You can remove this property if file logging is not required. If you want to keep the Monitoring Tool log, you can provide a name for the log file here.|
|logging.level.root||ERROR||Logging level of the root logger|
|logging.level.com.ephesoft||DEBUG||Logging level of the Monitoring Tool|
|spring.mail.host||smtp.gmail.com||Email host from which alerts will be sent|
|spring.mail.port||587||Port number from which alerts will be sent|
|email@example.com||Email ID used for sending alerts|
|spring.mail.password||xyz@32||Password for the email ID used for sending alerts. The password can also be provided in encrypted form, see the Note below.|
|true||Set this property to True if you are using the STARTTLS protocol.
Set it to False if you are using another protocol
|spring.thymeleaf.check-template-location||true||If this property is set to True, the system will check the location of the alert templates.
If this property is set to False, the system will not check the location of the alert templates.
Ephesoft recommends leaving this property unchanged.
|spring.thymeleaf.templates-root||config/templates||By default, email alert templates are located in the templates folder of the Monitoring Tool (<Ephesoft Installation Directory>\Application\monitoring-tool\config\templates). You can provide your own path here for storing Monitoring Tool templates.|
|spring.thymeleaf.suffix||.html||Suffix that gets appended to view names when building a URL. Ephesoft recommends leaving this property unchanged.|
|Email ID to which alerts will be sent. You can add as many emails as required by copying and pasting the property and updating the number in the brackets.|
|alert.mail.from||Ephesoft Support Team||This is what will appear in the mail body as FROM. You can specify any sender name you require|
|alert.mail.subject||Alert!||Subject of the alert email|
|Names of the email templates. If you want to change this property, make sure to change the name of the template in the templates folder first (<Ephesoft Installation Directory>\Application\monitoring-tool\config\templates) and only then update the name in the properties file.|
|log.monitor.log-event-switch||ON or OFF||Turn this switch ON to start monitoring log events|
|log.monitor.log-allocation-switch||ON or OFF||Turn this switch ON to start monitoring log size|
|log.monitor.hostname||localhost||Hostname of the server|
|log.monitor.port||1234||Port number used by the Monitoring Tool. This port should be the same as specified in the log4j.xml file.|
|log.monitor.date-format||yyyy-MM-dd HH:mm:ss||Date pattern which will be used in alert emails containing a time stamp|
|log.monitor.storage.allocated-size||200||Size of the log in MB|
|log.monitor.storage.percentage||75 (0 to 100)||Percentage of log file size. When this threshold is reached or exceeded, the system administrator will receive an alert.|
|log.monitor.storage.reinitialize-on-connect||false||This property governs whether to initialize the log file size to zero on application server reconnect. If set to False, it will start from the size which was captured before connection to the application server was lost.|
|log.monitor.event.connection-idle-timeout||5||Connection wait time (in minutes) after which the alert will be sent.|
|log.monitor.event.log-event-idle-timeout||5||Event wait time (in minutes) after which the alert will be sent.|
|file.monitor.disk-alert-switch||ON or OFF||Turn this switch ON to start monitoring log folder disk size|
|file.monitor.file-alert-switch||ON or OFF||Turn this switch ON to start monitoring log folder size|
|file.monitor.disk-percentage||75 (0 to 100)||Percentage of disk space. When this threshold is reached or exceeded, the system administrator will receive an alert.|
|file.monitor.log-folder-path||../logs||Path to the log folder|
|file.monitor.log-folder-percentage||75 (0 to 100)||Percentage of log folder size. When this threshold is reached or exceeded, the system administrator will receive an alert.|
|file.monitor.log-folder-allocated-size||0.5||Size of the log folder in MB|
- Run the Encryptor utility (<Ephesoft Installation Directory>\Application\ native\encryption\Encryptor.bat)
- In the opened window, provide your password and click Enter. Then copy encrypted data.
- In the application.properties file, provide encrypted password under the spring.mail.password parameter according to the following pattern:
For example, spring.mail.password=ENC(LKSjKtRdBfETEoNnNQgi+fsn0s1X3Nu2).
5. Navigate to the monitoring-tool folder and double-click on the start file to start the tool (start.bat for Windows and start.sh for Linux).
The tool is now monitoring logs according to the provided configuration and a log file is created in the Monitoring Tool folder.
If the tool detects any event that requires the attention of the system administrator, it generates a log record and sends a real-time alert to all email accounts specified in the application.properties file of the Monitoring Tool: