🕓 Open Distro Job Scheduler
Open Distro for Elasticsearch JobScheduler plugin provides a framework for Elasticsearch plugin
developers to schedule periodical jobs running within Elasticsearch nodes. You can schedule jobs
by specify an interval, or using Unix Cron expression to define more flexible schedule to execute
your job.
Elasticsearch plugin developers can easily extend JobScheduler plugin to schedule jobs like running
aggregation query against raw data and save the aggregated data into a new index every hour, or keep
monitoring the shard allocation by calling Elasticsearch API and post the output to a Webhook.
The JobScheduler plugin uses the Gradle
build system.
JAVA_HOME
to point to a JDK >=14./gradlew build
Then you will find the built artifact located at build/distributions
directory
Once you have built the plugin from source code, run
elasticsearch-plugin install file://${PLUGIN_ZIP_FILE_PATH}
to install the JobScheduler plugin to your Elasticsearch.
JobScheduler plugin provides a SPI for other plugins to implement. Essentially, you need to
ScheduledJobParameter
interfaceScheduledJobRunner
interfaceJobSchedulerExtension
interface
Please refer to the sample-extension-plugin
subproject in this project, which provides a complete
example of using JobScheduler to run periodical jobs.
The sample extension plugin takes an index name as input and logs the index shards to elasticsearch
logs according to the specified Schedule. And it also exposes a REST endpoint for end users to
create/delete jobs.
This project has adopted an Open Source Code of Conduct.
If you discover a potential security issue in this project we ask that you notify AWS/Amazon Security via our vulnerability reporting page. Please do not create a public GitHub issue.
See the LICENSE file for our project’s licensing. We will ask you to confirm the licensing of your contribution.