Valid from Datafari X.X

The alerts are stored in a local Apache Cassandra. You can create, edit or delete them from the alerts.html page which communicates with the Alerts servlet. This servlet creates a connection towards the database with the info contained in the alerts.properties file.

An alert is composed of seven fields:

The alertsAdmin UI and servlet are used to modify the alerts.properties file. It is used to:

The AlertsManager class is a Singleton and is called at each start/stop of the server by the StartAlertsListener.

At each start it reads the alerts.properties file to fill its own fields, and check if the alerts were on or off at the end of the previous execution of Datafari. If it was on On, the alerts Manager schedules the task according to the dates in the file. However if those are invalid, it will calculate the delays according to the original execution schedule of the alerts.

For instance the hourly alerts are set to begin at midnight, if everything is going smoothly, the hourly alerts will run at 00:00 then at 01:00 and so on. Now let's say that the date was already past at the start of Datafari. Then the AlertsManager will plan the execution for the next expected hour.

This allows the alerts to be run regularly, even after one or more restart of the server.

In order to run an alert:

The schema is wrong concerning the Datafari.properties file and mail.txt file, both files are no more used by the AlertsManager and they have been replaced by one configuration file named alerts.properties located in Datafari_Home/tomcat/conf

More info on our code

Please refer to our code in github, as our source code contains additional technical details avaiable as comments

(warning) If you are using the local file system connector (which is NOT recommended for production environment for security reasons), alerts cannot be used on plain text files, as Tika cannot extract any metadata like the modification date from them.