PUT _cluster/settings
{ "persistent": { "cluster.max_shards_per_node": "3000" } }
'기술 노트 > elasticsearch' 카테고리의 다른 글
elasticsearch 설정 (0) | 2023.02.16 |
---|---|
elasticsearch 설치 (0) | 2023.02.16 |
PUT _cluster/settings
{ "persistent": { "cluster.max_shards_per_node": "3000" } }
elasticsearch 설정 (0) | 2023.02.16 |
---|---|
elasticsearch 설치 (0) | 2023.02.16 |
elasticsearch 8.6.0 버전은 기본적으로 SSL 암호화 통신을 합니다.
저는 현재 설정은 SSL을 사용하지 않는 방법을 이용하겠습니다.
향후 SSL 적용 매뉴얼도 작성해서 올리도록 하겠습니다.
# ---------------------------------- Cluster -----------------------------------
#
# Use a descriptive name for your cluster:
# 클러스터 사용할 경우 아래 항목 활성화
# cluster.name: my-application
#
# ------------------------------------ Node ------------------------------------
#
# Use a descriptive name for the node:
#
node.name: tmplogsvr
#
# Add custom attributes to the node:
#
#node.attr.rack: r1
#
# --------------------------------- Discovery ----------------------------------
#
# Pass an initial list of hosts to perform discovery when this node is started:
# The default list of hosts is ["127.0.0.1", "[::1]"]
#
# discovery.seed_hosts: ["127.0.0.1"]
#
# Bootstrap the cluster using an initial set of master-eligible nodes:
# 클러스터 사용할 경우 아래 항목 설정 적용
# cluster.initial_master_nodes: ["tmplogsvr"]
#
# For more information, consult the discovery and cluster formation module documentation.
#
# ======================== Elasticsearch Configuration =========================
#
# NOTE: Elasticsearch comes with reasonable defaults for most settings.
# Before you set out to tweak and tune the configuration, make sure you
# understand what are you trying to accomplish and the consequences.
#
# The primary way of configuring a node is via this file. This template lists
# the most important settings you may want to configure for a production cluster.
#
# Please consult the documentation for further information on configuration options:
# https://www.elastic.co/guide/en/elasticsearch/reference/index.html
#
# ---------------------------------- Cluster -----------------------------------
#
# Use a descriptive name for your cluster:
#
cluster.name: my-application
#
# ------------------------------------ Node ------------------------------------
#
# Use a descriptive name for the node:
#
node.name: tmplogsvr
#
# Add custom attributes to the node:
#
#node.attr.rack: r1
#
# ----------------------------------- Paths ------------------------------------
#
# Path to directory where to store the data (separate multiple locations by comma):
#
path.data: /var/lib/elasticsearch
#
# Path to log files:
#
path.logs: /var/log/elasticsearch
#
# ----------------------------------- Memory -----------------------------------
#
# Lock the memory on startup:
#
#bootstrap.memory_lock: true
#
# Make sure that the heap size is set to about half the memory available
# on the system and that the owner of the process is allowed to use this
# limit.
#
# Elasticsearch performs poorly when the system is swapping the memory.
#
# ---------------------------------- Network -----------------------------------
#
# By default Elasticsearch is only accessible on localhost. Set a different
# address here to expose this node on the network:
#
network.host: 0.0.0.0
#
# By default Elasticsearch listens for HTTP traffic on the first free port it
# finds starting at 9200. Set a specific HTTP port here:
#
http.port: 9200
#
# For more information, consult the network module documentation.
#
# --------------------------------- Discovery ----------------------------------
#
# Pass an initial list of hosts to perform discovery when this node is started:
# The default list of hosts is ["127.0.0.1", "[::1]"]
#
#discovery.seed_hosts: ["127.0.0.1", "[::1]"]
#
# Bootstrap the cluster using an initial set of master-eligible nodes:
#
cluster.initial_master_nodes: ["tmplogsvr"]
#
# For more information, consult the discovery and cluster formation module documentation.
#
# --------------------------------- Readiness ----------------------------------
#
# Enable an unauthenticated TCP readiness endpoint on localhost
#
#readiness.port: 9399
#
# ---------------------------------- Various -----------------------------------
#
# Allow wildcard deletion of indices:
#
#action.destructive_requires_name: false
#----------------------- BEGIN SECURITY AUTO CONFIGURATION -----------------------
#
# The following settings, TLS certificates, and keys have been automatically
# generated to configure Elasticsearch security features on 16-02-2023 03:11:46
#
# --------------------------------------------------------------------------------
# Enable security features
xpack.security.enabled: false
xpack.security.enrollment.enabled: false
# Enable encryption for HTTP API client connections, such as Kibana, Logstash, and Agents
xpack.security.http.ssl:
enabled: false
keystore.path: certs/http.p12
# Enable encryption and mutual authentication between cluster nodes
xpack.security.transport.ssl:
enabled: false
verification_mode: certificate
keystore.path: certs/transport.p12
truststore.path: certs/transport.p12
# Create a new cluster with the current node only
# Additional nodes can still join the cluster later
#cluster.initial_master_nodes: ["localhost"]
# Allow HTTP API connections from anywhere
# Connections are encrypted and require user authentication
http.host: 0.0.0.0
# Allow other nodes to join the cluster from anywhere
# Connections are encrypted and mutually authenticated
#transport.host: 0.0.0.0
#----------------------- END SECURITY AUTO CONFIGURATION -------------------------
# Error 로그에exception during geoip databases update 가 있는 경우
ingest.geoip.downloader.enabled: false
elasticsearch shards 늘려주는 명령어 (0) | 2023.06.15 |
---|---|
elasticsearch 설치 (0) | 2023.02.16 |
해당 매뉴얼은 centos에서 설치하여 yum을 선택하였습니다.
https://www.elastic.co/kr/downloads/elasticsearch
#echo '[elasticsearch]
name=Elasticsearch repository for 8.x packages
baseurl=https://artifacts.elastic.co/packages/8.x/yum
gpgcheck=1
gpgkey=https://artifacts.elastic.co/GPG-KEY-elasticsearch
enabled=0
autorefresh=1
type=rpm-md' > /etc/yum.repos.d/elasticsearch.repo
현재 기준으로 표준 설치는 elasticsearch 8.6.2 이지만, elastalert의 plugin 버전을 맞춘겁니다.
설치 시 꼭 하단 링크의 elastalert의 버전과 호환되는 버전으로 설치하세요
elastalert-plugin: https://github.com/karql/elastalert-kibana-plugin/releases
[root@tmplogsvr ~]# yum install --enablerepo=elasticsearch elasticsearch
Elasticsearch repository for 8.x packages 19 MB/s | 24 MB 00:01
마지막 메타자료 만료확인 0:00:04 이전인: 2023년 03월 15일 (수) 오후 05시 45분 17초.
종속성이 해결되었습니다.
======================================================================================================================================
꾸러미 구조 버전 레포지터리 크기
======================================================================================================================================
설치 중:
elasticsearch x86_64 8.6.2-1 elasticsearch 555 M
연결 요약
======================================================================================================================================
설치 1 꾸러미
총계 내려받기 크기: 555 M
설치된 크기 : 1.1 G
진행 할 까요? [y/N]: y
꾸러미 내려받기 중:
elasticsearch-8.6.2-x86_64.rpm 34MB/s | 555 MB 00:16
--------------------------------------------------------------------------------------------------------------------------------------
합계 34 MB/s | 555 MB 00:16
Elasticsearch repository for 8.x packages 91 kB/s | 1.7 kB 00:00
GPG키 0xD88E42B4 가져오는 중:
사용자 ID : "Elasticsearch (Elasticsearch Signing Key) <dev_ops@elasticsearch.org>"
지문: 4609 5ACC 8548 582C 1A26 99A9 D27D 666C D88E 42B4
출처 : https://artifacts.elastic.co/GPG-KEY-elasticsearch
진행 할 까요? [y/N]: y
키 가져오기에 성공했습니다
연결 확인 실행 중
연결 확인에 성공했습니다.
연결 시험 실행 중
연결 시험에 성공했습니다.
연결 실행 중
준비 중 : 1/1
스크립트릿 실행 중: elasticsearch-8.6.2-1.x86_64 1/1
Creating elasticsearch group... OK
Creating elasticsearch user... OK
설치 중 : elasticsearch-8.6.2-1.x86_64 1/1
스크립트릿 실행 중: elasticsearch-8.6.2-1.x86_64 1/1
--------------------------- Security autoconfiguration information ------------------------------
Authentication and authorization are enabled.
TLS for the transport and HTTP layers is enabled and configured.
The generated password for the elastic built-in superuser is : =pabVnRNFDFfWzuZKdW=
If this node should join an existing cluster, you can reconfigure this with
'/usr/share/elasticsearch/bin/elasticsearch-reconfigure-node --enrollment-token <token-here>'
after creating an enrollment token on your existing cluster.
You can complete the following actions at any time:
Reset the password of the elastic built-in superuser with
'/usr/share/elasticsearch/bin/elasticsearch-reset-password -u elastic'.
Generate an enrollment token for Kibana instances with
'/usr/share/elasticsearch/bin/elasticsearch-create-enrollment-token -s kibana'.
Generate an enrollment token for Elasticsearch nodes with
'/usr/share/elasticsearch/bin/elasticsearch-create-enrollment-token -s node'.
-------------------------------------------------------------------------------------------------
'###NOT starting on installation, please execute the following statements to configure elasticsearch service to start automatically using systemd
sudo systemctl daemon-reload
sudo systemctl enable elasticsearch.service
'### You can start elasticsearch service by executing
sudo systemctl start elasticsearch.service
[/usr/lib/tmpfiles.d/elasticsearch.conf:1] Line references path below legacy directory /var/run/, updating /var/run/elasticsearch → /run/elasticsearch; please update the tmpfiles.d/ drop-in file accordingly.
확인 중 : elasticsearch-8.6.2-1.x86_64 1/1
설치되었습니다:
elasticsearch-8.6.2-1.x86_64
완료되었습니다!
[root@tmplogsvr ~]#
elasticsearch 시스템 등록
/bin/systemctl daemon-reload
/bin/systemctl enable elasticsearch.service
elasticsearch 시스템 시작 / 중지
/bin/systemctl start elasticsearch.service
/bin/systemctl stop elasticsearch.service
elasticsearch shards 늘려주는 명령어 (0) | 2023.06.15 |
---|---|
elasticsearch 설정 (0) | 2023.02.16 |