Guest User

elasticsearch.yml

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