forked from rhec/elasticsearch.github.com
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
21 changed files
with
320 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
--- | ||
layout: guide | ||
title: Cluster Update Settings API | ||
cat: guide | ||
sidebar: reference_api | ||
--- | ||
|
||
p. Allow to update cluster wide specific settings. Settings updated can either be persistent (applied cross restarts) or transient (will not survive a full cluster restart). Here is an example: | ||
|
||
|
||
<pre class="prettyprint"> | ||
curl -XPUT localhost:9200/_cluster/settings -d '{ | ||
"persistent" : { | ||
"discovery.zen.minimum_master_nodes" : 2 | ||
} | ||
}' | ||
</pre> | ||
|
||
p. Or: | ||
|
||
<pre class="prettyprint"> | ||
curl -XPUT localhost:9200/_cluster/settings -d '{ | ||
"transient" : { | ||
"discovery.zen.minimum_master_nodes" : 2 | ||
} | ||
}' | ||
</pre> | ||
|
||
There is a specific list of settings that can be updated, those include: | ||
|
||
* @discovery.zen.minimum_master_nodes@ | ||
* @index.shard.recovery.concurrent_streams@ | ||
* @cluster.routing.allocation.node_initial_primaries_recoveries@, @cluster.routing.allocation.node_concurrent_recoveries@ | ||
* @cluster.routing.allocation.cluster_concurrent_rebalance@ | ||
* @cluster.routing.allocation.awareness.attributes@ | ||
* @cluster.routing.allocation.awareness.force.*@ | ||
* @cluster.routing.allocation.disable_allocation@ | ||
* @cluster.routing.allocation.disable_replica_allocation@ | ||
* @cluster.routing.allocation.include.*@ | ||
* @cluster.routing.allocation.exclude.*@ | ||
* @indices.cache.filter.size@ | ||
* @indices.ttl.interval@ | ||
* @indices.recovery.file_chunk_size@, @indices.recovery.translog_ops@, @indices.recovery.translog_size@, @indices.recovery.compress@, @indices.recovery.concurrent_streams@, @indices.recovery.max_size_per_sec@. | ||
* @@ | ||
|
||
p. Logger values can also be updated by setting @logger.@ prefix. More settings will be allowed to be updated. | ||
|
||
p. Cluster wide settings can be returned using @curl -XGET localhost:9200/_cluster/settings@. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
--- | ||
layout: guide | ||
title: Indices Stats API | ||
cat: guide | ||
sidebar: reference_api | ||
--- | ||
|
||
p. Indices level stats provide statistics on different operations happening on an index. The API provides statistics on the index level scope (though most stats can also be retrieved using node level scope). | ||
|
||
The following returns high level aggregation and index level stats for all indices: | ||
|
||
<pre class="prettyprint"> | ||
curl localhost:9200/_stats | ||
</pre> | ||
|
||
Specific index stats can be retrieved using: | ||
|
||
<pre class="prettyprint"> | ||
curl localhost:9200/index1,index2/_stats | ||
</pre> | ||
|
||
By default, @docs@, @store@, and @indexing@, @get@, and @search@ stats are returned, other stats can be enabled as well: | ||
|
||
* @docs@: The number of docs / deleted docs (docs not yet merged out). Note, affected by refreshing the index. | ||
* @store@: The size of the index. | ||
* @indexing@: Indexing statistics, can be combined with a comma separated list of @types@ to provide document type level stats. | ||
* @get@: Get statistics, including missing stats. | ||
* @search@: Search statistics, including custom grouping using the @groups@ parameter (search operations can be associated with one or more groups). | ||
* @merge@: merge stats. | ||
* @flush@: flush stats. | ||
* @refresh@: refresh stats. | ||
* @clear@: Clears all the flags (first). | ||
|
||
p. Here are some samples: | ||
|
||
<pre class="prettyprint"> | ||
# Get back stats for merge and refresh on top of the defaults | ||
curl 'localhost:9200/_stats?merge=true&refresh=true' | ||
# Get back stats just for flush | ||
curl 'localhost:9200/_stats?clear=true&flush=true' | ||
# Get back stats for type1 and type2 documents for the my_index index | ||
curl 'localhost:9200/my_index/_stats?clear=true&indexing=true&types=type1,type2 | ||
</pre> | ||
|
||
p. The stats returned are aggregated on the index level, with @primaries@ and @total@ aggregations. In order to get back shard level stats, set the @level@ parameter to @shards@. | ||
|
||
p. Note, as shards move around the cluster, their stats will be cleared as they are created on other nodes. On the other hand, even though a shard "left" a node, that node will still retain the stats that shard contributed to. | ||
|
||
h2. Specific stats endpoints | ||
|
||
Instead of using flags to indicate which stats to return, specific REST endpoints can be used, for example: | ||
|
||
<pre class="prettyprint"> | ||
# Merge stats across all indices | ||
curl localhost:9200/_stats/merge | ||
# Merge stats for the my_index index | ||
curl localhost:9200/my_index/_stats/merge | ||
# Indexing stats for my_index | ||
curl localhost:9200/my_index/_stats/indexing | ||
# Indexing stats for my_index for my_type1 and my_type2 | ||
curl localhost:9200/my_index/_stats/indexing/my_type1,my_type2 | ||
</pre> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.