
[버전]
8.17.4 tar
[서버]
192.168.219.159 (master) : Elasticsearch, Kibana, Logstash, CA 인증서
192.168.219.157 (data) : Elasticsearch, Metricbeat
192.168.219.158 (data) : Elasticsearch
[root@localhost ~] su - elastic
[elastic@localhost ~]
wget https://artifacts.elastic.co/downloads/logstash/logstash-8.17.4-linux-x86_64.tar.gz
tar -xzf logstash-8.17.4-linux-x86_64.tar.gz
cd logstash-8.17.4
- 수집-전처리-전송 파이프라인을 구성하는 과정
- .conf 확장자를 가지며 logstash 가 어떤 데이터를 받고, 어떻게 처리해서, 어디로 보낼지를 정의하는 구성 파일
vi config/test.conf
input {
stdin {}
}
filter {
}
output {
elasticsearch {
hosts => ["https://192.168.219.159:9200"]
cacert => "/home/elastic/elasticsearch-8.17.4/config/certs/http_ca.cr
t"
index => "test_1"
user => "elastic"
password => "elastic"
}
stdout {}
}./bin/logstash -f config/test.config
./bin/logstash -f config/test.conf --config.debug nohup ./bin/logstash -f config/test.conf > logstash.out 2>&1 &./bin/logstashps -ef | grep logstash
ss -nltp | grep 9600 # logstash monitoring API 포트ps -ef | grep logstash
ss -nltp | grep 9600
curl --cacert config/certs/http_ca.crt -u elastic:{$password} https://localhost:9200/{index_name}/_search?prettyGET test1/_search