[๐ŸŒŽelasticsearch] Elasticsearch ํด๋”์—๋Š” ๋ญ๊ฐ€ ์žˆ์„๊นŒ??

Park Ji Youngยท2021๋…„ 1์›” 14์ผ
0

elasticsearch

๋ชฉ๋ก ๋ณด๊ธฐ
6/8
post-thumbnail
post-custom-banner


๐Ÿงก ElasitcSearch ํด๋” ๊ตฌ์กฐ

์‰ฌ์–ด๊ฐ€๋Š” ๋Š๋‚Œ์œผ๋กœ ElasticSearch ์˜ directory ๊ตฌ์กฐ๋ฅผ ํ•œ๋ฒˆ ์‚ดํŽด๋ณด๋„๋ก ํ•˜๊ฒ ์Šต๋‹ˆ๋‹ค.

ElasticSearch์˜ ํด๋”๋กœ ํ•œ๋ฒˆ ๊ฐ€๋ณด์ฃ !

์ €๋Š” elk๋ผ๋Š” ํด๋”์— elasticsearch ์™€ ๊ด€๋ จ๋œ ํด๋”๋“ค์„ ๋ชจ์•„๋‘์—ˆ์Šต๋‹ˆ๋‹ค.

๐Ÿ“’Bin ํด๋”

bin ํด๋” ์•ˆ์—๋Š” elasticsearch-cli, elasticsearch-sql-cli, elasicsearch-plugin ๋“ฑ๋“ฑ

elasticsearch ๊ธฐ๋Šฅ์˜ ํ•ต์‹ฌ์ ์ธ ์Šคํฌ๋ฆฝํŠธ ๋“ค์ด ์žˆ์Šต๋‹ˆ๋‹ค.

๊ฑด๋“ค์ง€๋งˆ์„ธ์šฉ .....

x-pack ๋ถ€๋ถ„์€ elasticsearch ์˜ ํ”Œ๋Ÿฌ๊ทธ์ธ(๋ณด์•ˆ, ์•Œ๋ฆผ, ๋ชจ๋‹ˆํ„ฐ๋ง, ๋ณด๊ณ , ๊ทธ๋ž˜ํ”„ ๋“ฑ)๋“ค์„ ๋ฒ„์ „์— ๋งž๊ฒŒ ๋ฌถ์€ ํŒจํ‚ค์ง€๋ผ๊ณ  ์ƒ๊ฐํ•˜์‹œ๋ฉด ๋ฉ๋‹ˆ๋‹ค.!! elasticsearch๋ฅผ ์•Œ๋ฆฌ๊ฒŒ ๋งŒ๋“  ๊ธฐ๋Šฅ๋“ค์˜ ์ง‘ํ•ฉ์ฒด๋ผ๊ณ  ์ƒ๊ฐํ•ฉ์‹œ๋‹ค.!!

๐Ÿ“’Config ํด๋”

elasticsearch.yml

์ด ํŒŒ์ผ์—์„œ elasticsearch ์˜ ์ „๋ฐ˜์ ์ธ ํ™˜๊ฒฝ์„ ์„ค์ •ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. ๋ฉ”๋ชจ์žฅ์ด๋‚˜ ์—๋””ํ„ฐ๋กœ ์ผœ์‹œ๋ฉด

# ---------------------------------- Cluster -----------------------------------
#
# Use a descriptive name for your cluster:
#
#cluster.name: my-application
#

cluster.name ์˜†์— #์„ ์ง€์šฐ์‹œ๊ณ  cluster.name : <์›ํ•˜๋Š” ์ด๋ฆ„> ์„ ์“ฐ์‹œ๋ฉด ํด๋Ÿฌ์Šคํ„ฐ ์ด๋ฆ„์„ ์„ค์ •ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

ํด๋Ÿฌ์Šคํ„ฐ์™€ ๋…ธ๋“œ์— ๋Œ€ํ•œ ๋‚ด์šฉ์€ ์ดํ›„ ํฌ์ŠคํŠธ์—์„œ ์ž์„ธํ•˜๊ฒŒ ๋‹ค๋ฃจ๊ฒ ์Šต๋‹ˆ๋‹ค.

๊ทธ ๋ฐ‘์— node, paths, memory, network, Discovery ๊ฐ€ ์žˆ์Šต๋‹ˆ๋‹ค.

  • paths ์—์„œ๋Š” ๋ฐ์ดํ„ฐ, ๋กœ๊ทธ๊ฐ€ ์ €์žฅ๋˜๋Š” ์œ„์น˜๋ฅผ ์ง€์ •ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.
  • memory ์—์„œ๋Š” ๋‹ค๋ฅธ ์ž๋ฐ”ํ”„๋กœ๊ทธ๋žจ์ด ์—˜๋ผ์Šคํ‹ฑ ์„œ์น˜์˜ ํž™ ์˜์—ญ์˜ ๋ฉ”๋ชจ๋ฆฌ๋ฅผ ์‚ฌ์šฉํ•˜์ง€ ๋ชปํ•˜๋„๋ก lock ์„ ๊ฑธ ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

    ํ•ด๋‹น memory ์ œํ•œ์€ jvm.option ํŒŒ์ผ์—์„œ ํž™์‚ฌ์ด์ฆˆ๋ฅผ ์กฐ์ •ํ•จ์œผ๋กœ์„œ ๋””ํ…Œ์ผํ•˜๊ฒŒ ์„ค์ •๊ฐ€๋Šฅํ•ฉ๋‹ˆ๋‹ค.

  • network ์—์„œ๋Š” ์–ด๋–ค ip์˜ ์–ด๋–ค port ๋ฒˆํ˜ธ๋กœ elasticsearch์— ์ ‘๊ทผ ํ•  ์ง€ ์„ค์ •๊ฐ€๋Šฅํ•ฉ๋‹ˆ๋‹ค.
  • discovery ์—์„œ๋Š” elasticsearch ์— ์–ผ๋งˆ๋‚˜ ๋งŽ์€ ์ธ์Šคํ„ด์Šค๋“ค์ด ์—ฐ๊ฒฐ ๋˜๋Š”์ง€ ์„ค์ •๊ฐ€๋Šฅํ•ฉ๋‹ˆ๋‹ค.

jvm.options

์ด ํŒŒ์ผ์—์„œ๋Š” elasticsearch ์— ํ—ˆ์šฉํ•ด์ค„ ๋ฉ”๋ชจ๋ฆฌ ํฌ๊ธฐ๋ฅผ ์„ค์ •ํ•ด์ค„ ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. ๊ธฐ๋ณธ์€ 1๊ธฐ๊ฐ€๋ฐ”์ดํŠธ ์ž…๋‹ˆ๋‹ค. ๋ฉ”๋ชจ๋ฆฌ ์™ธ์˜ ๋‚ด์šฉ์— ๋Œ€ํ•ด์„œ๋Š” ์ „๋ฌธ๊ฐ€๊ฐ€ ์•„๋‹ˆ๋ฉด ๊ฑด๋“ค์ง€ ๋ง™์‹œ๋‹ค ...

log4j2.properties

์—ฌ๊ธฐ๋Š” elasticsearch ์˜ ๋กœ๊ทธ ๊ด€๋ จ ํŒŒ์ผ๋กœ, log4j2๋Š” java ์˜ ๊ฐ€์žฅ ๊ฐ•๋ ฅํ•œ logging ํ”„๋ ˆ์ž„์›Œํฌ์ค‘ ํ•˜๋‚˜์ž…๋‹ˆ๋‹ค.

๐Ÿ“’modules ํด๋”

์—ฌ๊ธฐ๋Š” ์™„์ „ํžˆ elasticsearch ์˜ ๊ธฐ๋Šฅ์— ๋„์›€์„ ์ฃผ๋Š” built-in module ๋“ค์ด ๋ชจ์—ฌ์žˆ๋Š” ๊ณณ์ž…๋‹ˆ๋‹ค.
๋งŽ์€ x-pack ํด๋”๋“ค์ด ๋ณด์ด์‹œ์ฃ ~ ?

๐Ÿ“’plugins ํด๋”

์ด ํด๋”๋Š” ์šฐ๋ฆฌ๊ฐ€ elasticsearch ์— custom ํ”Œ๋Ÿฌ๊ทธ์ธ์„ ์ถ”๊ฐ€ํ•  ๋•Œ ์‚ฌ์šฉํ•˜๋Š” ํด๋”์ž…๋‹ˆ๋‹ค.

ํ”ผ๋“œ๋ฐฑ์€ ํ•ญ์ƒ ํ™˜์˜์ž…๋‹ˆ๋‹ค.!!
๋ง›์žˆ๋Š” ์ปคํ”ผ ๋“œ์‹œ๊ณ  ๊ณต๋ถ€ํ•˜์„ธ์š”!!

profile
I am two cat's father
post-custom-banner

0๊ฐœ์˜ ๋Œ“๊ธ€