Skip to content

Latest commit

 

History

History
71 lines (52 loc) · 2.37 KB

README.textile

File metadata and controls

71 lines (52 loc) · 2.37 KB

Elasticsearch Changes Plugin

The Elasticsearch Changes plugin is a plugin for Elasticsearch that tracks changes to indices and makes this information available
through a REST service. It provides information on node basis. So if you want the complete change information you have to query all nodes in your cluster.

This plugin is outdated! Please go to to https://github.com/jurgc11/es-change-feed-plugin for an updated version.

Installation

Run bin/plugin -install derryx/elasticsearch-changes-plugin

Configuration

You can set the length of the history buffer with the setting changes.history.size. The default is 100.

Usage

Point your browser to http://localhost:9200/_changes/ to see changes for all indices.
If you want to see changes only for one or a list of indices you can use http://localhost:9200/foo,bar,baz/_changes/.

You will get a response like this:

{
  "twitter" : {
    "lastChange" : 1330372696400,
    "changes" : [ {
      "type" : "CREATE",
      "id" : "qf310jYSSK2OsM0fWEXyIA",
      "timestamp" : 1330372680742,
      "version" : 1
    }, {
      "type" : "INDEX",
      "id" : "1",
      "timestamp" : 1330372689220,
      "version" : 2
    }, {
      "type" : "DELETE",
      "id" : "1",
      "timestamp" : 1330372696400,
      "version" : 3
    } ]
  },
  "bubu" : {
    "lastChange" : 1330369466133,
    "changes" : [ ]
  }
}

The timestamp is a UNIX timestamp in milliseconds (epoch midnight, January 1, 1970 UTC).

See changes after a given timestamp

If you want to see only changes after a given timestamp you can add the parameter since to the request (for example http://localhost:9200/_changes/?since=1330282941692 ). The timestamp again is a UNIX timestamp (in milliseconds).

Wait for a index change to happen

You can make your request wait for a change to happen with the parameter wait. Additionally you can give a timeout parameter (in milliseconds).
(example: http://localhost:9200/_changes/?wait=true&timeout=60000 ). The default timeout is 15 minutes.

Version mapping

  • Change Plugin 0.1.x → Elasticsearch 0.18.x
  • Change Plugin 0.2.x → Elasticsearch 0.19.x
  • Change Plugin 0.3.x → Elasticsearch 1.0.x
  • Change Plugin 0.4.x → Elasticsearch 1.7.x

Other information

See project’s GitHub pages for details.