cleanUrl: /elk/install-plugin-to-elastic-search-and-check-install-or-not

Elastic Search 에 직접 개발한 plugin 을 설치해야 하는 상황이 왔다. 매번 찾아보기 귀찮아 설치와 설치 후 제대로 설치가 된 것인지 확인하는 과정을 추가하고자 한다.

설치

현재 docker 로 ELK를 관리하는데 Elastic search를 관리하는 container에 다음과 같이 입력한다

sudo bin/elasticsearch-plugin install [plugin_name]

bin 안에는 다양한 파일들이 있는데 이것을 이용해서 Elastic Search 를 관리하는 것 같다.

https://s3-us-west-2.amazonaws.com/secure.notion-static.com/a291266e-c4f8-4397-b8c5-1acbeab38bce/Screen_Shot_2021-01-21_at_19.00.25.png

그런데 내 상황에선 회사에서 직접 만든 file plugin 을 설치해야 하는데 이것은 file:// 이라는 prefix를 함께 붙여 실행해야 한다.

sudo bin/elasticsearch-plugin install file:///path/directory/filename

물론 이렇게 설치하려면 docker 에 volume 을 mount 해둘 필요가 있다.

설치 확인

정말 설치가 된 것인지 확인해야 하는데 방법은 두 가지가 있다.

  1. container 안에서 확인하기

    sudo bin/elasticsearch-plugin list
    

    https://s3-us-west-2.amazonaws.com/secure.notion-static.com/76230763-8de9-421a-a11e-ee8824bdc498/Screen_Shot_2021-01-21_at_20.17.09.png

  2. kibana 에서 확인하기

    GET /_cat/plugins?v
    

    제대로 설치가 되었다면 다음과 같은 response 를 확인할 수 있다.

    https://s3-us-west-2.amazonaws.com/secure.notion-static.com/42a903c8-e66e-4017-aca5-523a95519e61/Screen_Shot_2021-01-21_at_20.16.30.png