지난 포스팅까지 elasticsearch cluster 구성은 완료했다.
이번엔 kibana를 설치하고 elasticsearch에 연동해보자.
최종적으로 아래와 같이 구성된다 보면 된다.
VM명 | Hostname | IP |
kibana-7.5.1 | kibana | 192.168.100.10 |
elasticsearch-7.5.1_1 | elastic1 | 192.168.100.11 |
elasticsearch-7.5.1_2 | elastic2 | 192.168.100.12 |
elasticsearch-7.5.1_3 | elastic3 | 192.168.100.13 |
자, 지난번에 위와 같이 VM은 생성해 두었으니 접속해서 설정해보자.
1. kibana 아카이브의 압축 해제
미리 받아 두었던 elasticsearch의 아카이브를 압축해제 하자.
[elastic@kibana ~]$ tar xvf kibana-7.5.1-linux-x86_64.tar.gz
2. kibana 폴더 구성 확인
압축 풀린 kibana 폴더의 구성을 확인해보자.
[elastic@kibana kibana-7.5.1-linux-x86_64]$ ls -al
total 1516
drwxrwxr-x. 13 elastic elastic 266 Jan 23 21:56 .
drwx------. 16 elastic elastic 4096 Jan 23 21:56 ..
-rw-r--r--. 1 elastic elastic 1932 Dec 16 18:46 .i18nrc.json
-rw-rw-r--. 1 elastic elastic 13675 Dec 16 18:46 LICENSE.txt
-rw-rw-r--. 1 elastic elastic 1453580 Dec 16 18:46 NOTICE.txt
-rw-rw-r--. 1 elastic elastic 4048 Dec 16 18:46 README.txt
drwxrwxr-x. 2 elastic elastic 64 Jan 23 21:56 bin
drwxrwxr-x. 5 elastic elastic 43 Jan 23 21:56 built_assets
drwxrwxr-x. 2 elastic elastic 24 Jan 23 21:56 config
drwxrwxr-x. 2 elastic elastic 6 Dec 16 18:46 data
drwxrwxr-x. 6 elastic elastic 108 Jan 23 21:56 node
drwxrwxr-x. 1206 elastic elastic 36864 Jan 23 21:56 node_modules
drwxrwxr-x. 3 elastic elastic 55 Jan 23 21:56 optimize
-rw-rw-r--. 1 elastic elastic 738 Dec 16 18:46 package.json
drwxrwxr-x. 2 elastic elastic 6 Dec 16 18:46 plugins
drwxrwxr-x. 11 elastic elastic 146 Jan 23 21:56 src
drwxrwxr-x. 2 elastic elastic 4096 Jan 23 21:56 webpackShims
drwxrwxr-x. 5 elastic elastic 129 Jan 23 21:56 x-pack
[elastic@kibana kibana-7.5.1-linux-x86_64]$
- bin/ : kibana의 실행 파일들이 모여 있는 폴더
- built_assets/ : css, js 등의 웹 관련 파일들이 모여 있는 폴더
- config/ : kibana 관련 설정 파일들이 모여 있는 폴더
- data/ : 설치 초기에는 비어있다. 나중에 데이터들이 저장될 폴더
- node/, node_modules/ : node.js 실행파일 및 관련 모듈들이 모여있는 폴더 (kibana가 node.js 기반인 듯 하다.)
- plugins/ : kibana 플러그인들이 설치되는 폴더
- x-pack/ : security 등 x-pack 관련 실행/설정 파일들이 모여 있는 폴더
3. config 파일 구성 확인
컨피그 파일들의 구성을 확인해보자.
[elastic@kibana config]$ ls -al
total 8
drwxrwxr-x. 2 elastic elastic 24 Jan 23 21:56 .
drwxrwxr-x. 13 elastic elastic 266 Jan 23 22:56 ..
-rw-r--r--. 1 elastic elastic 5149 Dec 16 18:46 kibana.yml
[elastic@kibana config]$
kibana.yml 파일 하나다. 아주 깔끔하네.
4. kibana.yml 설정
kibana 설정 파일을 열어 설정을 해보자.
[elastic@kibana config]$ vi kibana.yml
server.host: "192.168.100.10"
elasticsearch.hosts: ["http://192.168.100.11:9200", "http://192.168.100.12:9200", "http://192.168.100.13:9200"]
- server.host : kibana를 구동할 서버의 주소.
- elasticsearch.hosts : 연동할 elasticsearch의 주소. (우리는 node 3개로 cluster 구성을 했으니 3개 다 써주자.)
5. kibana 실행
기본 설정은 했으니 kibana를 구동해보자.
[elastic@kibana config]$ cd ../bin/
[elastic@kibana bin]$ ./kibana
log [04:14:27.636] [info][plugins-system] Setting up [15] plugins: [licensing,security,code,timelion,features,spaces,translations,newsfeed,expressions,eui_utils,uiActions,data,inspector,embeddable,advancedUiActions]
log [04:14:27.645] [info][licensing][plugins] Setting up plugin
log [04:14:27.649] [info][plugins][security] Setting up plugin
log [04:14:27.650] [warning][config][plugins][security] Generating a random key for xpack.security.encryptionKey. To prevent sessions from being invalidated on restart, please set xpack.security.encryptionKey in kibana.yml
log [04:14:27.650] [warning][config][plugins][security] Session cookies will be transmitted over insecure connections. This is not recommended.
log [04:14:27.685] [info][code][plugins] Setting up plugin
log [04:14:27.687] [info][plugins][timelion] Setting up plugin
log [04:14:27.688] [info][features][plugins] Setting up plugin
log [04:14:27.689] [info][plugins][spaces] Setting up plugin
log [04:14:27.694] [info][plugins][translations] Setting up plugin
log [04:14:27.694] [info][data][plugins] Setting up plugin
log [04:14:51.764] [info][licensing][plugins] Imported changed license information from Elasticsearch for the [data] cluster: type: basic | status: active
log [04:14:52.084] [warning][legacy-plugins] Skipping non-plugin directory at /home/elastic/kibana-7.5.1-linux-x86_64/src/legacy/core_plugins/visualizations
log [04:14:52.641] [info][plugins-system] Starting [8] plugins: [licensing,security,code,timelion,features,spaces,translations,data]
log [04:14:52.748] [info][migrations] Creating index .kibana_task_manager_1.
log [04:14:52.914] [info][migrations] Creating index .kibana_1.
log [04:14:54.264] [info][migrations] Pointing alias .kibana_task_manager to .kibana_task_manager_1.
log [04:14:54.518] [info][migrations] Finished in 1770ms.
log [04:14:54.591] [info][migrations] Pointing alias .kibana to .kibana_1.
log [04:14:54.787] [info][migrations] Finished in 1890ms.
log [04:14:57.304] [info][status][plugin:kibana@7.5.1] Status changed from uninitialized to green - Ready
log [04:14:57.307] [info][status][plugin:elasticsearch@7.5.1] Status changed from uninitialized to yellow - Waiting for Elasticsearch
log [04:14:57.308] [info][status][plugin:xpack_main@7.5.1] Status changed from uninitialized to yellow - Waiting for Elasticsearch
log [04:14:57.314] [info][status][plugin:graph@7.5.1] Status changed from uninitialized to yellow - Waiting for Elasticsearch
log [04:14:57.327] [info][status][plugin:monitoring@7.5.1] Status changed from uninitialized to green - Ready
log [04:14:57.330] [info][status][plugin:spaces@7.5.1] Status changed from uninitialized to yellow - Waiting for Elasticsearch
log [04:14:57.357] [info][status][plugin:security@7.5.1] Status changed from uninitialized to green - Ready
log [04:14:57.359] [info][status][plugin:searchprofiler@7.5.1] Status changed from uninitialized to yellow - Waiting for Elasticsearch
log [04:14:57.362] [info][status][plugin:ml@7.5.1] Status changed from uninitialized to yellow - Waiting for Elasticsearch
log [04:14:57.404] [info][status][plugin:tilemap@7.5.1] Status changed from uninitialized to yellow - Waiting for Elasticsearch
log [04:14:57.406] [info][status][plugin:watcher@7.5.1] Status changed from uninitialized to yellow - Waiting for Elasticsearch
log [04:14:57.428] [info][status][plugin:grokdebugger@7.5.1] Status changed from uninitialized to yellow - Waiting for Elasticsearch
log [04:14:57.431] [info][status][plugin:dashboard_mode@7.5.1] Status changed from uninitialized to green - Ready
log [04:14:57.432] [info][status][plugin:logstash@7.5.1] Status changed from uninitialized to yellow - Waiting for Elasticsearch
log [04:14:57.441] [info][status][plugin:beats_management@7.5.1] Status changed from uninitialized to yellow - Waiting for Elasticsearch
log [04:14:57.453] [info][status][plugin:apm_oss@7.5.1] Status changed from uninitialized to green - Ready
log [04:14:57.474] [info][status][plugin:apm@7.5.1] Status changed from uninitialized to green - Ready
log [04:14:57.476] [info][status][plugin:interpreter@7.5.1] Status changed from uninitialized to green - Ready
log [04:14:57.477] [info][status][plugin:expressions@7.5.1] Status changed from uninitialized to green - Ready
log [04:14:57.480] [info][status][plugin:maps@7.5.1] Status changed from uninitialized to yellow - Waiting for Elasticsearch
log [04:14:57.503] [info][status][plugin:canvas@7.5.1] Status changed from uninitialized to green - Ready
log [04:14:57.507] [info][status][plugin:license_management@7.5.1] Status changed from uninitialized to green - Ready
log [04:14:57.509] [info][status][plugin:cloud@7.5.1] Status changed from uninitialized to green - Ready
log [04:14:57.511] [info][status][plugin:index_management@7.5.1] Status changed from uninitialized to yellow - Waiting for Elasticsearch
log [04:14:57.546] [info][status][plugin:console@7.5.1] Status changed from uninitialized to green - Ready
log [04:14:57.547] [info][status][plugin:console_extensions@7.5.1] Status changed from uninitialized to green - Ready
log [04:14:57.549] [info][status][plugin:index_lifecycle_management@7.5.1] Status changed from uninitialized to yellow - Waiting for Elasticsearch
log [04:14:57.556] [info][status][plugin:kuery_autocomplete@7.5.1] Status changed from uninitialized to green - Ready
log [04:14:57.558] [info][status][plugin:metrics@7.5.1] Status changed from uninitialized to green - Ready
log [04:14:57.596] [info][status][plugin:infra@7.5.1] Status changed from uninitialized to green - Ready
log [04:14:57.605] [info][task_manager] Initialising Task Manager with UUID: 162cbee8-4c67-4597-9984-491c05b759aa
log [04:14:57.606] [info][status][plugin:task_manager@7.5.1] Status changed from uninitialized to green - Ready
log [04:14:57.608] [info][status][plugin:rollup@7.5.1] Status changed from uninitialized to yellow - Waiting for Elasticsearch
log [04:14:57.627] [info][status][plugin:transform@7.5.1] Status changed from uninitialized to yellow - Waiting for Elasticsearch
log [04:14:57.629] [info][siem] Plugin initializing
log [04:14:57.654] [info][siem] Plugin done initializing
log [04:14:57.654] [info][status][plugin:siem@7.5.1] Status changed from uninitialized to green - Ready
log [04:14:57.658] [info][status][plugin:remote_clusters@7.5.1] Status changed from uninitialized to yellow - Waiting for Elasticsearch
log [04:14:57.660] [info][status][plugin:cross_cluster_replication@7.5.1] Status changed from uninitialized to yellow - Waiting for Elasticsearch
log [04:14:57.673] [info][status][plugin:upgrade_assistant@7.5.1] Status changed from uninitialized to green - Ready
log [04:14:57.702] [info][status][plugin:uptime@7.5.1] Status changed from uninitialized to green - Ready
log [04:14:57.705] [info][status][plugin:oss_telemetry@7.5.1] Status changed from uninitialized to green - Ready
log [04:14:57.723] [info][status][plugin:file_upload@7.5.1] Status changed from uninitialized to yellow - Waiting for Elasticsearch
log [04:14:57.726] [warning][encrypted_saved_objects] Generating a random key for xpack.encrypted_saved_objects.encryptionKey. To be able to decrypt encrypted saved objects attributes after restart, please set xpack.encrypted_saved_objects.encryptionKey in kibana.yml
log [04:14:57.727] [info][status][plugin:encrypted_saved_objects@7.5.1] Status changed from uninitialized to green - Ready
log [04:14:57.728] [info][status][plugin:data@7.5.1] Status changed from uninitialized to green - Ready
log [04:14:57.732] [info][status][plugin:lens@7.5.1] Status changed from uninitialized to green - Ready
log [04:14:57.745] [info][status][plugin:snapshot_restore@7.5.1] Status changed from uninitialized to yellow - Waiting for Elasticsearch
log [04:14:57.751] [info][status][plugin:kibana_react@7.5.1] Status changed from uninitialized to green - Ready
log [04:14:57.752] [info][status][plugin:navigation@7.5.1] Status changed from uninitialized to green - Ready
log [04:14:57.755] [info][status][plugin:region_map@7.5.1] Status changed from uninitialized to green - Ready
log [04:14:57.761] [info][status][plugin:telemetry@7.5.1] Status changed from uninitialized to green - Ready
log [04:14:57.863] [info][status][plugin:timelion@7.5.1] Status changed from uninitialized to green - Ready
log [04:14:57.867] [info][status][plugin:ui_metric@7.5.1] Status changed from uninitialized to green - Ready
log [04:14:57.869] [info][status][plugin:markdown_vis@7.5.1] Status changed from uninitialized to green - Ready
log [04:14:57.871] [info][status][plugin:metric_vis@7.5.1] Status changed from uninitialized to green - Ready
log [04:14:57.873] [info][status][plugin:table_vis@7.5.1] Status changed from uninitialized to green - Ready
log [04:14:57.875] [info][status][plugin:tagcloud@7.5.1] Status changed from uninitialized to green - Ready
log [04:14:57.877] [info][status][plugin:vega@7.5.1] Status changed from uninitialized to green - Ready
log [04:14:57.880] [warning][browser-driver][reporting] Enabling the Chromium sandbox provides an additional layer of protection.
log [04:14:59.064] [info][status][plugin:elasticsearch@7.5.1] Status changed from yellow to green - Ready
log [04:14:59.104] [info][license][xpack] Imported license information from Elasticsearch for the [data] cluster: mode: basic | status: active
log [04:14:59.110] [info][status][plugin:xpack_main@7.5.1] Status changed from yellow to green - Ready
log [04:14:59.110] [info][status][plugin:graph@7.5.1] Status changed from yellow to green - Ready
log [04:14:59.111] [info][status][plugin:searchprofiler@7.5.1] Status changed from yellow to green - Ready
log [04:14:59.112] [info][status][plugin:ml@7.5.1] Status changed from yellow to green - Ready
log [04:14:59.112] [info][status][plugin:tilemap@7.5.1] Status changed from yellow to green - Ready
log [04:14:59.112] [info][status][plugin:watcher@7.5.1] Status changed from yellow to green - Ready
log [04:14:59.112] [info][status][plugin:grokdebugger@7.5.1] Status changed from yellow to green - Ready
log [04:14:59.113] [info][status][plugin:logstash@7.5.1] Status changed from yellow to green - Ready
log [04:14:59.113] [info][status][plugin:beats_management@7.5.1] Status changed from yellow to green - Ready
log [04:14:59.113] [info][status][plugin:index_management@7.5.1] Status changed from yellow to green - Ready
log [04:14:59.113] [info][status][plugin:index_lifecycle_management@7.5.1] Status changed from yellow to green - Ready
log [04:14:59.114] [info][status][plugin:rollup@7.5.1] Status changed from yellow to green - Ready
log [04:14:59.114] [info][status][plugin:transform@7.5.1] Status changed from yellow to green - Ready
log [04:14:59.114] [info][status][plugin:remote_clusters@7.5.1] Status changed from yellow to green - Ready
log [04:14:59.114] [info][status][plugin:cross_cluster_replication@7.5.1] Status changed from yellow to green - Ready
log [04:14:59.114] [info][status][plugin:file_upload@7.5.1] Status changed from yellow to green - Ready
log [04:14:59.115] [info][status][plugin:snapshot_restore@7.5.1] Status changed from yellow to green - Ready
log [04:14:59.115] [info][kibana-monitoring][monitoring] Starting monitoring stats collection
log [04:14:59.128] [info][status][plugin:maps@7.5.1] Status changed from yellow to green - Ready
log [04:15:00.707] [info][status][plugin:spaces@7.5.1] Status changed from yellow to green - Ready
log [04:15:03.385] [warning][reporting] Generating a random key for xpack.reporting.encryptionKey. To prevent pending reports from failing on restart, please set xpack.reporting.encryptionKey in kibana.yml
log [04:15:03.394] [info][status][plugin:reporting@7.5.1] Status changed from uninitialized to green - Ready
log [04:15:03.503] [info][listening] Server running at http://192.168.100.10:5601
log [04:15:03.541] [info][server][Kibana][http] http server running at http://192.168.100.10:5601
쭈욱 로그들이 올라오고 마지막에 "http server running at http://192.168.100.10:5601" 라는 메세지가 보인다.
정상적으로 실행된 것 같으니 접속해보자.
6. kibana 접속
웹 브라우저를 통해 접속해보자.
엥... 접속이 안된다. 깜빡했다.. 방화벽 끄자.
[elastic@kibana bin]$ service firewalld stop
Redirecting to /bin/systemctl stop firewalld.service
==== AUTHENTICATING FOR org.freedesktop.systemd1.manage-units ====
Authentication is required to stop 'firewalld.service'.
Authenticating as: root
Password:
==== AUTHENTICATION COMPLETE ====
[elastic@kibana bin]$
자, 다시 구동하고 접속해보자.
접속 잘된다.
일단 기본적인 elasticsearch cluster + kibana의 구성은 완료했다.
다음 부터는 보안이나 기타 디테일한 설정들, 그리고 elasticsearch 인덱싱, 쿼리 등을 진행해보자.
끝.
2020/01/11 - [elastic-stack] - VM을 활용한 Elastic Stack 실습 환경 구축 1 - VM 생성하기
2020/01/16 - [elastic-stack] - VM을 활용한 Elastic Stack 실습 환경 구축 2 - elasticsearch 기본 설정
2020/01/16 - [elastic-stack] - VM을 활용한 Elastic Stack 실습 환경 구축 3 - cluster 기본 설정
2020/01/24 - [elastic-stack] - VM을 활용한 Elastic Stack 실습 환경 구축 4 - kibana 기본 설정
'elastic-stack' 카테고리의 다른 글
VM을 활용한 Elastic Stack 7.8 실습 환경 구축 1 - VM 생성하기 (2) | 2020.07.07 |
---|---|
VM을 활용한 Elastic Stack 실습 환경 구축 3 - cluster 기본 설정 (0) | 2020.01.16 |
VM을 활용한 Elastic Stack 실습 환경 구축 2 - elasticsearch 기본 설정 (0) | 2020.01.16 |
VM을 활용한 Elastic Stack 실습 환경 구축 1 - VM 생성하기 (2) | 2020.01.11 |
Elasticsearch의 shard와 replica (0) | 2020.01.11 |
댓글