Difference between revisions of "Monitoring Cluster-Enabled Quartz Instances"
From AgileApps Support Wiki
imported>Aeric |
imported>Aeric |
||
(14 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
===Monitoring Cluster--Enabled Quartz Instances=== | <includeonly>===Monitoring Cluster--Enabled Quartz Instances===</includeonly> | ||
This process sets up an automatic check that sends an email alert when Quartz is down. | |||
# Verify that these lines are in the <tt> | # Verify that these lines are in the <tt>AALSchedulers.xml</tt> file. (They are present in new installations, but are not automatically added during upgrades.) | ||
#:<syntaxhighlight lang="perl" enclose="div"> | #:<syntaxhighlight lang="perl" enclose="div"> | ||
org.quartz.scheduler.instanceId = AUTO | <attribute name="org.quartz.scheduler.instanceId" = value="AUTO"/> # Automatically assigns instance IDs to prevent conflicts | ||
... | ... | ||
org.quartz.jobStore.misfireThreshold = 60000 | <attribute name="org.quartz.jobStore.misfireThreshold" = value="60000"/> # Prevent infinite loop if a job can't start, but keeps retrying | ||
... | ... | ||
org.quartz.jobStore.isClustered = true | <attribute name="org.quartz.jobStore.isClustered" = value="true"/> # Turn on clustering | ||
org.quartz.jobStore.clusterCheckinInterval = 20000 | <attribute name="org.quartz.jobStore.clusterCheckinInterval" = value="20000"/> | ||
</syntaxhighlight> | </syntaxhighlight> | ||
# Download the [{{DOCHOST}}/files/monitor_quartz.pl monitor_quartz.pl] (Perl) script from the platform downloads area. | # Download the [{{DOCHOST}}/files/monitor_quartz.pl monitor_quartz.pl] (Perl) script from the platform downloads area. | ||
# | #: | ||
# Set these variable values for your installation: | |||
#:* <tt>$mysql_username</tt> - Database user name. | #:* <tt>$mysql_username</tt> - Database user name. | ||
#:* <tt>$mysql_password</tt> - Database password. | #:* <tt>$mysql_password</tt> - Database password. | ||
#:* <tt>$mysql_host</tt> - Name of server the database is running on. | #:* <tt>$mysql_host</tt> - Name of server the database is running on. | ||
#:: | |||
#:* <tt>$config_file</tt> - Absolute path to <tt>tomcat/webapps/networking/WEB-INF/web.xml</tt> | |||
#:* <tt>$recipients</tt> - Comma-separated list of email addresses who will receive email status messages | #:* <tt>$recipients</tt> - Comma-separated list of email addresses who will receive email status messages | ||
#: | #: | ||
# | # Run the script in the background.<br>You'll get an email alert whenever the script discovers 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.) | ||
<noinclude> | |||
[[Category:Installation]] | |||
</noinclude> |
Latest revision as of 10:43, 11 August 2017
This process sets up an automatic check that sends an email alert when Quartz is down.
- Verify that these lines are in the AALSchedulers.xml file. (They are present in new installations, but are not automatically added during upgrades.)
- <syntaxhighlight lang="perl" enclose="div">
<attribute name="org.quartz.scheduler.instanceId" = value="AUTO"/> # Automatically assigns instance IDs to prevent conflicts ... <attribute name="org.quartz.jobStore.misfireThreshold" = value="60000"/> # Prevent infinite loop if a job can't start, but keeps retrying ... <attribute name="org.quartz.jobStore.isClustered" = value="true"/> # Turn on clustering <attribute name="org.quartz.jobStore.clusterCheckinInterval" = value="20000"/> </syntaxhighlight>
- Download the monitor_quartz.pl (Perl) script from the platform downloads area.
- Set these variable values for your installation:
- $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
- Run the script in the background.
You'll get an email alert whenever the script discovers 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.)