Difference between revisions of "Monitoring Cluster-Enabled Quartz Instances"
From AgileApps Support Wiki
imported>Aeric |
imported>Aeric (ua) |
||
Line 1: | Line 1: | ||
===Monitoring Cluster--Enabled Quartz Instances=== | ===Monitoring Cluster--Enabled Quartz Instances=== | ||
This process sets up an automatic check that sends an email alert when Quartz is down. | |||
# Verify that these lines are in the <tt>quartz.properties</tt> file. (They are present in new installations, but are not automatically added during upgrades.) | # Verify that these lines are in the <tt>quartz.properties</tt> file. (They are present in new installations, but are not automatically added during upgrades.) | ||
Line 24: | Line 26: | ||
#:* <tt>-e"SELECT LAST_CHECKIN_TIME FROM QRTZ_SCHEDULER_STATE WHERE INSTANCE_NAME LIKE '%SERVER_IP_HERE%' and ...</tt> | #:* <tt>-e"SELECT LAST_CHECKIN_TIME FROM QRTZ_SCHEDULER_STATE WHERE INSTANCE_NAME LIKE '%SERVER_IP_HERE%' and ...</tt> | ||
#: | #: | ||
# Run the script on your server. | # Run the script on your server.<br>You'll get an email alert whenever it is found that Quartz isn't running. | ||
#: | |||
;How it Works: | ;How it Works: | ||
:The lines in the properties file cause quartz to put an entry into the relationals.QRTZ_SCHEDULER_STATE table in the database. The script checks the timestamp to verify that the last stamp was within 5 minutes. (Quartz should be running once a minute. If it hasn't run in five minutes, it is considered to be down.) | :The lines in the properties file cause quartz to put an entry into the relationals.QRTZ_SCHEDULER_STATE table in the database. The script checks the timestamp to verify that the last stamp was within 5 minutes. (Quartz should be running once a minute. If it hasn't run in five minutes, it is considered to be down.) |
Revision as of 18:00, 19 July 2011
Monitoring Cluster--Enabled Quartz Instances
This process sets up an automatic check that sends an email alert when Quartz is down.
- Verify that these lines are in the quartz.properties file. (They are present in new installations, but are not automatically added during upgrades.)
- <syntaxhighlight lang="perl" enclose="div">
org.quartz.scheduler.instanceId = AUTO ... org.quartz.jobStore.misfireThreshold = 60000 ... org.quartz.jobStore.isClustered = true org.quartz.jobStore.clusterCheckinInterval = 20000 </syntaxhighlight>
- Download the monitor_quartz.pl (Perl) script from the platform downloads area.
- Set these variable values for your installation:
- $hostname - Server name
- $mysql_username - Database user name.
- $mysql_password - Database password.
- $mysql_host - Name of server the database is running on.
- $config_file - Absolute path to tomcat/webapps/networking/WEB-INF/web.xml
- $recipients - Comma-separated list of email addresses who will receive email status messages
- In the verifyQuartz subroutine, modify the first command string to insert the IP address for your server
- -e"SELECT LAST_CHECKIN_TIME FROM QRTZ_SCHEDULER_STATE WHERE INSTANCE_NAME LIKE '%SERVER_IP_HERE%' and ...
- Run the script on your server.
You'll get an email alert whenever it is found that Quartz isn't running.
- How it Works
- The lines in the properties file cause quartz to put an entry into the relationals.QRTZ_SCHEDULER_STATE table in the database. The script checks the timestamp to verify that the last stamp was within 5 minutes. (Quartz should be running once a minute. If it hasn't run in five minutes, it is considered to be down.)