Advertisement
Guest User

ES-Config

a guest
May 14th, 2014
220
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 12.90 KB | None | 0 0
  1. ##################### ElasticSearch Configuration Example #####################
  2.  
  3. # This file contains an overview of various configuration settings,
  4. # targeted at operations staff. Application developers should
  5. # consult the guide at <http://elasticsearch.org/guide>.
  6. #
  7. # The installation procedure is covered at
  8. # <http://elasticsearch.org/guide/reference/setup/installation.html>.
  9. #
  10. # ElasticSearch comes with reasonable defaults for most settings,
  11. # so you can try it out without bothering with configuration.
  12. #
  13. # Most of the time, these defaults are just fine for running a production
  14. # cluster. If you're fine-tuning your cluster, or wondering about the
  15. # effect of certain configuration option, please _do ask_ on the
  16. # mailing list or IRC channel [http://elasticsearch.org/community].
  17.  
  18. # Any element in the configuration can be replaced with environment variables
  19. # by placing them in ${...} notation. For example:
  20. #
  21. # node.rack: ${RACK_ENV_VAR}
  22.  
  23. # See <http://elasticsearch.org/guide/reference/setup/configuration.html>
  24. # for information on supported formats and syntax for the configuration file.
  25.  
  26.  
  27. ################################### Cluster ###################################
  28.  
  29. # Cluster name identifies your cluster for auto-discovery. If you're running
  30. # multiple clusters on the same network, make sure you're using unique names.
  31. #
  32. # cluster.name: elasticsearch
  33. cluster.name: MyIndex
  34.  
  35.  
  36. #################################### Node #####################################
  37.  
  38. # Node names are generated dynamically on startup, so you're relieved
  39. # from configuring them manually. You can tie this node to a specific name:
  40. #
  41. # node.name: "Franz Kafka"
  42.  
  43. # Every node can be configured to allow or deny being eligible as the master,
  44. node.name: "master"
  45.  
  46. threadpool:
  47. index:
  48. type: fixed
  49. size: 30
  50. queue: 50000
  51. reject_policy: caller
  52.  
  53. index:
  54. store:
  55. type: niofs
  56.  
  57. # and to allow or deny to store the data.
  58. #
  59. # Allow this node to be eligible as a master node (enabled by default):
  60. #
  61. node.master: true
  62.  
  63. # Allow this node to store data (enabled by default):
  64. #
  65. # node.data: true
  66.  
  67. # You can exploit these settings to design advanced cluster topologies.
  68. #
  69. # 1. You want this node to never become a master node, only to hold data.
  70. # This will be the "workhorse" of your cluster.
  71. #
  72. # node.master: false
  73. # node.data: true
  74. #
  75. # 2. You want this node to only serve as a master: to not store any data and
  76. # to have free resources. This will be the "coordinator" of your cluster.
  77. #
  78. # node.master: true
  79. # node.data: false
  80. #
  81. # 3. You want this node to be neither master nor data node, but
  82. # to act as a "search load balancer" (fetching data from nodes,
  83. # aggregating results, etc.)
  84. #
  85. # node.master: false
  86. # node.data: false
  87.  
  88. # Use the Cluster Health API [http://localhost:9200/_cluster/health], the
  89. # Node Info API [http://localhost:9200/_cluster/nodes] or GUI tools
  90. # such as <http://github.com/lukas-vlcek/bigdesk> and
  91. # <http://mobz.github.com/elasticsearch-head> to inspect the cluster state.
  92.  
  93. # A node can have generic attributes associated with it, which can later be used
  94. # for customized shard allocation filtering, or allocation awareness. An attribute
  95. # is a simple key value pair, similar to node.key: value, here is an example:
  96. #
  97. # node.rack: rack314
  98.  
  99. # By default, multiple nodes are allowed to start from the same installation location
  100. # to disable it, set the following:
  101. # node.max_local_storage_nodes: 1
  102.  
  103.  
  104. #################################### Index ####################################
  105.  
  106. # You can set a number of options (such as shard/replica options, mapping
  107. # or analyzer definitions, translog settings, ...) for indices globally,
  108. # in this file.
  109. #
  110. # Note, that it makes more sense to configure index settings specifically for
  111. # a certain index, either when creating it or by using the index templates API.
  112. #
  113. # See <http://elasticsearch.org/guide/reference/index-modules/> and
  114. # <http://elasticsearch.org/guide/reference/api/admin-indices-create-index.html>
  115. # for more information.
  116.  
  117. # Set the number of shards (splits) of an index (5 by default):
  118. #
  119. # index.number_of_shards: 5
  120.  
  121. # Set the number of replicas (additional copies) of an index (1 by default):
  122. #
  123. # index.number_of_replicas: 1
  124.  
  125. # Note, that for development on a local machine, with small indices, it usually
  126. # makes sense to "disable" the distributed features:
  127. #
  128. # index.number_of_shards: 1
  129. # index.number_of_replicas: 0
  130.  
  131. # These settings directly affect the performance of index and search operations
  132. # in your cluster. Assuming you have enough machines to hold shards and
  133. # replicas, the rule of thumb is:
  134. #
  135. # 1. Having more *shards* enhances the _indexing_ performance and allows to
  136. # _distribute_ a big index across machines.
  137. # 2. Having more *replicas* enhances the _search_ performance and improves the
  138. # cluster _availability_.
  139. #
  140. # The "number_of_shards" is a one-time setting for an index.
  141. #
  142. # The "number_of_replicas" can be increased or decreased anytime,
  143. # by using the Index Update Settings API.
  144. #
  145. # ElasticSearch takes care about load balancing, relocating, gathering the
  146. # results from nodes, etc. Experiment with different settings to fine-tune
  147. # your setup.
  148.  
  149. # Use the Index Status API (<http://localhost:9200/A/_status>) to inspect
  150. # the index status.
  151.  
  152.  
  153. #################################### Paths ####################################
  154.  
  155. # Path to directory containing configuration (this file and logging.yml):
  156. #
  157. # path.conf: /etc/elasticsearch
  158. # path.conf: /opt/eliasticsearch-0.90.0/config
  159.  
  160. # Path to directory where to store index data allocated for this node.
  161. #
  162. path.data: /hdd3/ES90Index
  163. #
  164. # Can optionally include more than one location, causing data to be striped across
  165. # the locations (à la RAID 0) on a file level, favouring locations with most free
  166. # space on creation. For example:
  167. #
  168. # path.data: /path/to/data1,/path/to/data2
  169.  
  170. # Path to temporary files:
  171. #
  172. # path.work: /path/to/work
  173.  
  174. # Path to log files:
  175. #
  176. # path.logs: /opt/elasticsearch-0.90.0/logs
  177.  
  178. # Path to where plugins are installed:
  179. #
  180. # path.plugins: /path/to/plugins
  181.  
  182.  
  183. #################################### Plugin ###################################
  184.  
  185. # If a plugin listed here is not installed for current node, the node will not start.
  186. #
  187. # plugin.mandatory: mapper-attachments,lang-groovy
  188.  
  189.  
  190. ################################### Memory ####################################
  191.  
  192. # ElasticSearch performs poorly when JVM starts swapping: you should ensure that
  193. # it _never_ swaps.
  194. #
  195. # Set this property to true to lock the memory:
  196. #
  197. # bootstrap.mlockall: true
  198.  
  199. # Make sure that the ES_MIN_MEM and ES_MAX_MEM environment variables are set
  200. # to the same value, and that the machine has enough memory to allocate
  201. # for ElasticSearch, leaving enough memory for the operating system itself.
  202. #
  203. # You should also make sure that the ElasticSearch process is allowed to lock
  204. # the memory, eg. by using `ulimit -l unlimited`.
  205.  
  206.  
  207. ############################## Network And HTTP ###############################
  208.  
  209. # ElasticSearch, by default, binds itself to the 0.0.0.0 address, and listens
  210. # on port [9200-9300] for HTTP traffic and on port [9300-9400] for node-to-node
  211. # communication. (the range means that if the port is busy, it will automatically
  212. # try the next port).
  213.  
  214. # Set the bind address specifically (IPv4 or IPv6):
  215. #
  216. network.bind_host: 172.20.20.213
  217.  
  218. # Set the address other nodes will use to communicate with this node. If not
  219. # set, it is automatically derived. It must point to an actual IP address.
  220. #
  221. network.publish_host: 172.20.20.213
  222.  
  223. # Set both 'bind_host' and 'publish_host':
  224. #
  225. # network.host: 192.168.0.1
  226.  
  227. # Set a custom port for the node to node communication (9300 by default):
  228. #
  229. # transport.tcp.port: 9300
  230.  
  231. # Enable compression for all communication between nodes (disabled by default):
  232. #
  233. # transport.tcp.compress: true
  234.  
  235. # Set a custom port to listen for HTTP traffic:
  236. #
  237. # http.port: 9200
  238.  
  239. # Set a custom allowed content length:
  240. #
  241. # http.max_content_length: 100mb
  242.  
  243. # Disable HTTP completely:
  244. #
  245. # http.enabled: false
  246.  
  247.  
  248. ################################### Gateway ###################################
  249.  
  250. # The gateway allows for persisting the cluster state between full cluster
  251. # restarts. Every change to the state (such as adding an index) will be stored
  252. # in the gateway, and when the cluster starts up for the first time,
  253. # it will read its state from the gateway.
  254.  
  255. # There are several types of gateway implementations. For more information,
  256. # see <http://elasticsearch.org/guide/reference/modules/gateway>.
  257.  
  258. # The default gateway type is the "local" gateway (recommended):
  259. #
  260. # gateway.type: local
  261.  
  262. # Settings below control how and when to start the initial recovery process on
  263. # a full cluster restart (to reuse as much local data as possible when using shared
  264. # gateway).
  265.  
  266. # Allow recovery process after N nodes in a cluster are up:
  267. #
  268. # gateway.recover_after_nodes: 1
  269.  
  270. # Set the timeout to initiate the recovery process, once the N nodes
  271. # from previous setting are up (accepts time value):
  272. #
  273. # gateway.recover_after_time: 5m
  274.  
  275. # Set how many nodes are expected in this cluster. Once these N nodes
  276. # are up (and recover_after_nodes is met), begin recovery process immediately
  277. # (without waiting for recover_after_time to expire):
  278. #
  279. # gateway.expected_nodes: 2
  280.  
  281.  
  282. ############################# Recovery Throttling #############################
  283.  
  284. # These settings allow to control the process of shards allocation between
  285. # nodes during initial recovery, replica allocation, rebalancing,
  286. # or when adding and removing nodes.
  287.  
  288. # Set the number of concurrent recoveries happening on a node:
  289. #
  290. # 1. During the initial recovery
  291. #
  292. # cluster.routing.allocation.node_initial_primaries_recoveries: 4
  293. #
  294. # 2. During adding/removing nodes, rebalancing, etc
  295. #
  296. # cluster.routing.allocation.node_concurrent_recoveries: 2
  297.  
  298. # Set to throttle throughput when recovering (eg. 100mb, by default unlimited):
  299. #
  300. # indices.recovery.max_size_per_sec: 0
  301.  
  302. # Set to limit the number of open concurrent streams when
  303. # recovering a shard from a peer:
  304. #
  305. # indices.recovery.concurrent_streams: 5
  306.  
  307.  
  308. ################################## Discovery ##################################
  309.  
  310. # Discovery infrastructure ensures nodes can be found within a cluster
  311. # and master node is elected. Multicast discovery is the default.
  312.  
  313. # Set to ensure a node sees N other master eligible nodes to be considered
  314. # operational within the cluster. Set this option to a higher value (2-4)
  315. # for large clusters (>3 nodes):
  316. #
  317. # discovery.zen.minimum_master_nodes: 1
  318.  
  319. # Set the time to wait for ping responses from other nodes when discovering.
  320. # Set this option to a higher value on a slow or congested network
  321. # to minimize discovery failures:
  322. #
  323. # discovery.zen.ping.timeout: 3s
  324.  
  325. # See <http://elasticsearch.org/guide/reference/modules/discovery/zen.html>
  326. # for more information.
  327.  
  328. # Unicast discovery allows to explicitly control which nodes will be used
  329. # to discover the cluster. It can be used when multicast is not present,
  330. # or to restrict the cluster communication-wise.
  331. #
  332. # 1. Disable multicast discovery (enabled by default):
  333. #
  334. discovery.zen.ping.multicast.enabled: true
  335. #
  336. # 2. Configure an initial list of master nodes in the cluster
  337. # to perform discovery when new nodes (master or data) are started:
  338. #
  339. discovery.zen.ping.unicast.hosts: ["172.20.20.212:9300"]
  340.  
  341. # EC2 discovery allows to use AWS EC2 API in order to perform discovery.
  342. #
  343. # You have to install the cloud-aws plugin for enabling the EC2 discovery.
  344. #
  345. # See <http://elasticsearch.org/guide/reference/modules/discovery/ec2.html>
  346. # for more information.
  347. #
  348. # See <http://elasticsearch.org/tutorials/2011/08/22/elasticsearch-on-ec2.html>
  349. # for a step-by-step tutorial.
  350.  
  351.  
  352. ################################## Slow Log ##################################
  353.  
  354. # Shard level query and fetch threshold logging.
  355.  
  356. #index.search.slowlog.level: TRACE
  357. #index.search.slowlog.threshold.query.warn: 10s
  358. #index.search.slowlog.threshold.query.info: 5s
  359. #index.search.slowlog.threshold.query.debug: 2s
  360. #index.search.slowlog.threshold.query.trace: 500ms
  361.  
  362. #index.search.slowlog.threshold.fetch.warn: 1s
  363. #index.search.slowlog.threshold.fetch.info: 800ms
  364. #index.search.slowlog.threshold.fetch.debug: 500ms
  365. #index.search.slowlog.threshold.fetch.trace: 200ms
  366.  
  367. ################################## GC Logging ################################
  368.  
  369. #monitor.jvm.gc.ParNew.warn: 1000ms
  370. #monitor.jvm.gc.ParNew.info: 700ms
  371. #monitor.jvm.gc.ParNew.debug: 400ms
  372.  
  373. #monitor.jvm.gc.ConcurrentMarkSweep.warn: 10s
  374. #monitor.jvm.gc.ConcurrentMarkSweep.info: 5s
  375. #monitor.jvm.gc.ConcurrentMarkSweep.debug: 2s
  376. # threadpool:
  377. # search:
  378. # type: fixed
  379. # size: 20
  380. # queue_size: 1000
  381. # reject_policy: caller
  382. # index:
  383. # type: fixed
  384. # size: 10
  385. # queue_size: 1000
  386. # reject_policy: caller
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement