Notice
Recent Posts
Recent Comments
Link
«   2025/04   »
1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30
Archives
Today
Total
관리 메뉴

더비창고방

Kibana 설치하기 본문

STUDY

Kibana 설치하기

moongzeee 2022. 12. 20. 17:53

[목차]

  1. 개요
    1.1 Kibana 란?
  2. Kibana 설치 및 실행
    2.1 RPM으로 Kibana 설치
    2.2 Kibana 설정
    2.3 Kibana 실행 및 설치 확인

1. 개요

1.1 Kibana 란?

ElasticSearch의 index 데이터를 검색하여 분석 및 시각화 하는 플랫폼이며, 다양한 차트와 테이블 및 맵에서 데이터 시각화기능을 제공한다. Kibana는 ElasticSearch의 결과를 보여주는 역할을 하기 때문에 ElasticSearch 설치가 필수이다.

2. Kibana 설치 및 실행

2.1 RPM으로 Kibana 설치

  • Elastic GPG 키 가져오기

아래 명령어를 실행하여 Elastic GPG 키를 가져온다.

rpm --import <https://artifacts.elastic.co/GPG-KEY-elasticsearch>
  • Kibana 설치를 위한 repo 파일 생성
[ec2-user@ip-XXX-XX-XX-XXX /]$ sudo vi /etc/yum.repos.d/kibana.repo

[kibana.repo]

[kibana-7.x]
name=Kibana repository for 7.x packages
baseurl=https://artifacts.elastic.co/packages/7.x/yum
gpgcheck=1
gpgkey=https://artifacts.elastic.co/GPG-KEY-elasticsearch
enabled=1
autorefresh=1
type=rpm-md

-kibana 설치

아래 명령어를 실행하여 kibana.repo에 명시한 버전으로 kibana를 다운받는다.

[ec2-user@ip-XXX-XX-XX-XXX /]$ yum install -y kibana

2.2 Kibana 설정

  • Kibana.yml 파일을 수정하여 elasticsearch와 연동 설정한다.

아래 명령어를 실행하여 Kibana.yml 편집을 실행한다.

[ec2-user@ip-XXX-XX-XX-XXX /]$ vi /etc/kibana/kibana.yml

아래와 같이 Kibana.yml을 수정한다.

[kibana.yml]

ki# Kibana is served by a back end server. This setting specifies the port to use.
server.port: 5601

# Specifies the address to which the Kibana server will bind. IP addresses and host names are both valid values.
# The default is 'localhost', which usually means remote machines will not be able to connect.
# To allow connections from remote users, set this parameter to a non-loopback address.
#server.host: "localhost"
server.host: "0.0.0.0"

# Enables you to specify a path to mount Kibana at if you are running behind a proxy.
# Use the `server.rewriteBasePath` setting to tell Kibana if it should remove the basePath
# from requests it receives, and to prevent a deprecation warning at startup.
# This setting cannot end in a slash.
#server.basePath: ""

# Specifies whether Kibana should rewrite requests that are prefixed with
# `server.basePath` or require that they are rewritten by your reverse proxy.
# This setting was effectively always `false` before Kibana 6.3 and will
# default to `true` starting in Kibana 7.0.
#server.rewriteBasePath: false

# The maximum payload size in bytes for incoming server requests.
#server.maxPayloadBytes: 1048576

# The Kibana server's name.  This is used for display purposes.
#server.name: "your-hostname"

# The URLs of the Elasticsearch instances to use for all your queries.
elasticsearch.hosts: ["http://elasticsearch_ip:9200"]

# When this setting's value is true Kibana uses the hostname specified in the server.host
# setting. When the value of this setting is false, Kibana uses the hostname of the host
# that connects to this Kibana instance.
#elasticsearch.preserveHost: true

** elasticsearch가 multi node일 경우,

elasticsearch.hosts: ["http://node1_ip:9200","http://node2_ip:9200","http://node3_ip:9200"]

2.3 Kibana 실행 및 설치 확인

sudo -i service kibana start 명령어를 실행하고 잠시 기다린 뒤,

sudo -i service kibana status 명령어 실행하여, Kibana is running으로 나오면 실행이 된 것이다.

http://[kibana server ip]:5601 에 접속하여,

아래의 그림과 같이 나오면 Kibana 설치된 것을 확인할 수 있다.