Alerting

GlueSync natively supports sending alerts via email. The severity of the alerts catched during the process will only be error. This process can be customized tweaking the alerting configuration file according to the logback’s framework documentation available at: http://logback.qos.ch/documentation.html.

To provide GlueSync a custom Logback configuration file, you need to set the actual file path into an environment variable called LOG_CONFIG_FILE. Once set, GlueSync will override its default log settings and use the provided ones.

Standard configuration setting is explained here below that uses, for example, a Gmail SMTP server for sending emails alerts:

<appender name="EMAIL" class="ch.qos.logback.classic.net.SMTPAppender">
   <smtpHost>smtp.gmail.com</smtpHost>
   <smtpPort>587</smtpPort>
   <STARTTLS>true</STARTTLS>
   <username>myusername@mycompany.com</username>
   <password>mysecretpassword</password>
   <asynchronousSending>true</asynchronousSending>
   <to>receiveremailaddress@mydomainname.com</to>
   <from>mysenderemailaddress@mydomainname.com</from>
   <subject>GlueSync SQL-to-NoSQL: %c{1} - %msg</subject>
   <layout class="ch.qos.logback.classic.html.HTMLLayout"/>
   <cyclicBufferTracker class="ch.qos.logback.core.spi.CyclicBufferTracker">
       <!-- send just one log entry per email -->
       <bufferSize>1</bufferSize>
   </cyclicBufferTracker>
</appender>
the more the buffer size the more information your alert email will have inside respect the previous error attempt.

Be sure to add the new appender reference inside the xml node logger section for the severity needed as described below.

<logger name="com.gluesync" level="error" additivity="false">
       <appender-ref ref="EMAIL"/>
</logger>