Logstach 설치
Elastic Search[참조] https://www.elastic.co/guide/kr/logstash/current/installing-logstash.html
1) Download & Extract
https://artifacts.elastic.co/downloads/logstash/logstash-7.0.1.tar.gz
> sudo su -
> cd /usr/local
> tar zxvf logstash-7.0.1.tar.gz
2) Logstash 파이프라인을 생성 테스트 실행테스트
bin/logstash -e 'input { stdin { } } output { stdout {} }'
위 문장을 실행하면 대기모드가 되는데, "hello world" 입력한다.
그럼 결과가 아래와 같이 나타난다.
{
"@timestamp" => 2019-05-16T23:54:07.736Z,
"host" => "myhost",
"@version" => "1",
"message" => "hello world"
}
Ctrl + D 를 눌러 종료한다.
3) 아파치로그 파싱해보기 + FileBeat 을 이용해 Log를 Logstash 로 보내기
FileBeat 은 log 를 발송하는 Client 측이고, Beats input은 서버측이다.
Beats input 은 Beats 를 기본 골격으로 하는 FileBeat, PacketBeat, MetricBeat 등을 모두 받아들일 수 있다.
그리고 이를 Logstash 로 전송한다.
샘플 데이타 다운로드 : https://download.elastic.co/demos/logstash/gettingstarted/logstash-tutorial.log.gz
FileBeat : https://www.elastic.co/kr/downloads/beats/filebeat
( https://github.com/elastic/beats/tree/master/filebeat )
Beats input : https://www.elastic.co/guide/en/logstash/5.4/plugins-inputs-beats.html
3.1.Download FileBeat 에서 https://www.elastic.co/kr/downloads/beats/filebeat
https://artifacts.elastic.co/downloads/beats/filebeat/filebeat-7.0.1-linux-x86_64.tar.gz
3.2.FileBeat 설치
https://www.elastic.co/guide/en/logstash/5.4/advanced-pipeline.html#configuring-filebeat
'Elastic Search' 카테고리의 다른 글
용어 (0) | 2023.08.28 |
---|---|
[I] FireBeat 설치 (0) | 2019.05.20 |
KIBANA.샘플데이터 로드 (0) | 2019.05.09 |
KIBANA 설치 (0) | 2019.04.30 |
검색 실행 (0) | 2019.04.30 |