Monitor and get alerts for your workflows with the Oozie SLAs

Monitor and get alerts for your workflows with the Oozie SLAs

Hue now makes Oozie SLAs easy to use! With SLAs, you can automatically be alerted when some workflows are not done within a certain window of time. Oozie SLAs have been improved a lot in Oozie 4, hence this new feature requires Oozie 4.x.

SLAs can be setup in the Editor in the advanced tabs of:

  • Workflow properties

  • Workflow action properties

  • Coordinator properties

SLAs can be visualized In the Dashboard:

  • New main SLA tab for searching and graphing

  • Individual SLA tab for single workflow or coordinator

We do not cover setup of JMS notifications here. JMS enables clients to be alerted in real time of the notifications (instead of pooling like in this tutorial). With Hue, you can visualize the success of your job in a timelime and setup email-notification in case of alerts.

As usual feel free to comment on the hue-user list or @gethue!

Note
How to enable SLA in Oozie itself?

First make sure you are using Oozie 4. If you need to upgrade from Oozie 3, don’t forget to update the Oozie sharelib with:

sudo -u oozie /usr/lib/oozie/bin/oozie-setup.sh sharelib create -fs hdfs://localhost:8020 -locallib /usr/lib/oozie/oozie-sharelib-yarn.tar.gz

If for some reason you need to reset the Oozie DB, delete it and recreate it with:

sudo -u oozie /usr/lib/oozie/bin/ooziedb.sh create -sqlfile oozie.sql -run

Note
In order to avoid the exception below, you should not have the SLA properties in oozie-site.xml.

Exception in thread "main" java.lang.NoClassDefFoundError: javax/mail/MessagingException
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Class.java:270)

Then open oozie-site.xml and add these properties and restart Oozie:

<property>
  <name>oozie.services.ext</name>
  <value>
    org.apache.oozie.service.EventHandlerService,
    org.apache.oozie.sla.service.SLAService
  </value>
</property>
<property>
  <name>oozie.service.EventHandlerService.event.listeners</name>
  <value>
    org.apache.oozie.sla.listener.SLAJobEventListener,
    org.apache.oozie.sla.listener.SLAEmailEventListener
  </value>
</property>