Skip to content

Job Failures Notification Deamon

rrgomez edited this page Jul 23, 2012 · 4 revisions

This little script will allow you to monitor specified jobs and alerting user by email if the pass rate is under a set level. the pass rate level can be set inside the script.

The script is located at $WARDEN_WEB_HOME/script/job_fail_notification.rb

To start the daemon:

ruby job_fail_notification.rb start <email_list> <job_name> <start_checking_at>
<email_list>: it can be a email or a list of email seperated by , or ;.
<job_name>: it will do a DB like search as '%job_name%'
<start_checking_at>: define the date you want to daemon to start check on, default to Time.now
e.g. ruby job_fail_notification.rb start 'victor@exmaple.com, team@exmaple.com' 'daily_cron' '2012/06/11'

Note: Don't forget to add a space after the comma for multiple recipients in the email list. If you forget the space you might not actually receive emails.

To check the daemon:

ruby job_fail_notification.rb status

To stop the daemon:

ruby job_fail_notification.rb stop