Categories

Versions

Execution alerts

Execution alerts offer the special ability to get notified with more detailed output when a process execution fails or a job cannot be scheduled. They are an addition to the normal server log output. Currently

  • server log and
  • mail notifications

are supported as execution alert type. The default execution alert is set to 'no operation' which basically doesn't handle those errors above in a special way. You will still see the normal server log output and the error log reported by any job.

Enable error reporting by job/schedule

By default the execution alert will not be triggered. You've to submit jobs or create schedules by calling theREST APImanually with the additional attribuereportError: true. As a further step you've to set up the error reporter as below.

Error reporter configuration

To configure a specific execution alert type please setREPORTING_ERROR_TYPEas environment variable. Depending on the error reporting type you have chosen, you may have to add additional properties which are described below.

Type: Server Log

  1. Add theREPORTING_ERROR_TYPE = loggingproperty.
  2. You're good to go and the execution alert is set up. They should be reported to the usual server log.

The output might look like the following:

Execution of job '835a387a-74c9-4617-a36f-954c97d7e53a' has failed with error type 'USER_ERROR'. Title: . Message: <message>. Stacktrace: <stacktrace></code></pre>
      <h3>Type: Mail Notifications</h3>
      <ol>
       <li>Add<code>REPORTING_ERROR_TYPE = mail</code></li>
       <li>Add<code>REPORTING_ERROR_MAIL_TO = receiverAddress@domain.tld</code>to define the mail address which will receive alert mails</li>
       <li><p>Add a mail configuration for<em>sending the mails</em>. Here, you have two options:</p>
        <ul>
         <li><p>If you've configured a mail server in the RapidMiner Server installer, you just need to add the corresponding JNDI name and you're good to go.</p><pre><code class="```">SPRING_MAIL_JNDI_NAME = java:/Mail</code></pre></li>
         <li><p>If you haven't configured a mail server in the installer or if you like to use another mail server, you need to add the appropriate<code>SPRING_MAIL.*</code>environment variables. A detailed list which properties are available can be found on<a href="https://docs.spring.io/spring-boot/docs/current/reference/html/common-application-properties.html">spring.io</a>. You may also need to define<a href="https://javaee.github.io/javamail/docs/api/com/sun/mail/smtp/package-summary.html">JavaMail properties</a>which will be listed under<code>SPRING_MAIL_PROPERTIES.*</code>.</p><p>A simple setup might look like the following which also uses JavaMail properties.</p><pre><code class="```">SPRING_MAIL_HOST = myHost SPRING_MAIL_PORT = 587 SPRING_MAIL_USERNAME = myUser SPRING_MAIL_PASSWORD = myPassword SPRING_MAIL_PROPERTIES_MAIL_SMTP_AUTH = true SPRING_MAIL_PROPERTIES_MAIL_SMTP_STARTTLS_ENABLE = true SPRING_MAIL_PROPERTIES_MAIL_SMTP_STARTTLS_REQUIRED = true</code></pre></li>
        </ul></li>
       <li>(Optional) If you like to automatically redirect or tag incoming alert mails, you can set the variable<code>REPORTING_ERROR_MAIL_SUBJECT_PREFIX</code>to a custom prefix and handle all mails containing this subject prefix in your mailbox.</li>
       <li>(Optional) If you like to display a specific sender address and/or a name, you can set the following properties:<ul>
         <li><code>REPORTING_ERROR_MAIL_FROM_ADDRESS = senderAddress@domain.tld</code>which must be a valid sender address of your user which you've already defined via<code>SPRING_MAIL_USERNAME</code>or<code>SPRING_MAIL_JNDI_NAME</code></li>
         <li><code>REPORTING_ERROR_MAIL_FROM_NAME = My Sender</code>which must be a valid name</li>
        </ul></li>
       <li>You're good to go and the execution alert is set up. Notifications should be sent via mail.</li>
      </ol>
      <p>An example mail might look like the following:</p>
      <pre><code>[RapidMiner Server Execution Error Report] Insufficient capability Execution of job '545778e9-8bf1-49cb-8197-0d41dc015ef9' has failed with error type 'USER_ERROR'. Title: Insufficient capability Message: The operator SVM does not have sufficient capabilities for the given data set: polynominal label not supported Stacktrace: Process[1] (Process) subprocess 'Main Process' +- Retrieve Iris[1] (Retrieve) ==> +- SVM[1] (Support Vector Machine)</code></pre>
     </div>
    </div>
   </div>
  </div>
  <div class="footer footer">
   <div id="footerFloat">
    <div id="footerContent">
     <div id="footerLeft">
      <a class="brand-image" href="//www.turtlecreekpls.com/docs/"><img alt="Brand" src="//www.turtlecreekpls.com/docs/assets/img/Horizontal_Logo_1-color_White_RapidMiner.png"></a>
     </div>
     <div id="footerCenter">
      © 2023 RapidMiner, Inc. All Rights Reserved.<a href="//www.turtlecreekpls.com/docs/privacy-policy/">Privacy Policy</a>
     </div>
     <div id="footerRight">
      <a class="optanon-show-settings">Manage My Cookie Settings</a>
     </div>
    </div>
   </div>
  </div>
 </body>
</html>