|
| 1 | +h1. elasticsearch-segmentspy |
| 2 | + |
| 3 | +SegmentSpy is a tool to watch the segments in your indices. Segment graphs update in real-time, allowing you to watch as ElasticSearch (Lucene) merges your segments. |
| 4 | + |
| 5 | +|_. elasticsearch-segmentspy |_. ElasticSearch | |
| 6 | +| master | 0.17.0 -> master | |
| 7 | + |
| 8 | +*Note*: SegmentSpy has only been tested on 0.20.2, but should work all the way back to 0.17.0 when the Segments API was implemented |
| 9 | + |
| 10 | +h3. Installation |
| 11 | +To install SegmentSpy onto your node, run <code>bin/plugin -install polyfractal/elasticsearch-segmentspy</code> |
| 12 | + |
| 13 | +SegmentSpy automatically connects to the host specified in the URL used to display the plugin. For example, if you are running a node on <code>localhost:9200</code>, then point your browser to <code>http://localhost:9200/_plugin/segmentspy/</code>. The plugin will automatically connect to <code>localhost:9200</code> and begin parsing your cluster state. |
| 14 | + |
| 15 | +!screenshot.png! |
| 16 | + |
| 17 | +h3. Usage |
| 18 | +Select your index from the dropdown box at the top of the page. A graph will be loaded for each shard on every node in your cluster, grouped by node. The refresh interval can be changed (default is 500ms) or paused completely. That's it! Fire up some inserts on your cluster to watch as ElasticSearch/Lucene creates new segments or merges away old ones. |
| 19 | + |
| 20 | + |
| 21 | + |
| 22 | +h3. Background Information |
| 23 | +SegmentSpy utilizes the "Indices Segments API":http://www.elasticsearch.org/guide/reference/api/admin-indices-segments.html that ElasticSearch provides. |
| 24 | + |
| 25 | +This tool was inspired by the fantastic article and videos produced by Mike McCandless "Visualizing Lucene's Segment Merges":http://blog.mikemccandless.com/2011/02/visualizing-lucenes-segment-merges.html article. The visuals of this plugin aren't as sophisticated as Mike's yet, but most of the functionality should be possible using the API. |
| 26 | + |
| 27 | +Future versions will allow you to |
| 28 | +* Differentiate searchable vs unsearchable segments |
| 29 | +* Watch deletes accumulate in indices before merging out |
| 30 | +* Sort on factors other than doc size (doc number, deletes, etc) |
| 31 | +* More robust filtering of nodes/indices for large clusters |
| 32 | +* More? |
| 33 | + |
| 34 | +This plugin is functional...but messy underneath. Developers beware! If you feel like helping out, fork SegmentSpy and make some changes! |
0 commit comments