本文介紹在 Windows 7 操作系統(tǒng)上安裝 Logstash 6.6.0 的方法與過程。
版本說明
- Oracle JDK 1.8.0_201
- logstash-6.6.0.zip
安裝步驟
- 下載 Logstash 6.6.0 安裝版本藐鹤。
- 解壓縮到本地瓤檐,進(jìn)入安裝路徑下
bin
目錄娱节,新建文件logstash_default.conf
。
input {
stdin{
}
}
output {
stdout{
}
}
- 繼續(xù)在
bin
目錄下新建文件run_default.bat
括堤。
logstash -f logstash_default.conf
- 雙擊運(yùn)行
run_default.bat
碌秸,等待啟動(dòng)日志打印完成悄窃。
D:\Dev\ELK\logstash-6.6.0\bin>logstash -f logstash_default.conf
Sending Logstash logs to D:/Dev/ELK/logstash-6.6.0/logs which is now configured
via log4j2.properties
[2019-02-15T11:28:07,769][INFO ][logstash.setting.writabledirectory] Creating di
rectory {:setting=>"path.queue", :path=>"D:/Dev/ELK/logstash-6.6.0/data/queue"}
[2019-02-15T11:28:07,784][INFO ][logstash.setting.writabledirectory] Creating di
rectory {:setting=>"path.dead_letter_queue", :path=>"D:/Dev/ELK/logstash-6.6.0/d
ata/dead_letter_queue"}
[2019-02-15T11:28:07,928][WARN ][logstash.config.source.multilocal] Ignoring the
'pipelines.yml' file because modules or command line options are specified
[2019-02-15T11:28:07,946][INFO ][logstash.runner ] Starting Logstash {"
logstash.version"=>"6.6.0"}
[2019-02-15T11:28:07,981][INFO ][logstash.agent ] No persistent UUID f
ile found. Generating new UUID {:uuid=>"0b82cf1c-e133-4407-8b8a-fad3f652d4cd", :
path=>"D:/Dev/ELK/logstash-6.6.0/data/uuid"}
[2019-02-15T11:28:19,097][INFO ][logstash.pipeline ] Starting pipeline {:
pipeline_id=>"main", "pipeline.workers"=>4, "pipeline.batch.size"=>125, "pipelin
e.batch.delay"=>50}
[2019-02-15T11:28:19,302][INFO ][logstash.pipeline ] Pipeline started suc
cessfully {:pipeline_id=>"main", :thread=>"#<Thread:0x14a251cf run>"}
The stdin plugin is now waiting for input:
[2019-02-15T11:28:19,366][INFO ][logstash.agent ] Pipelines running {:
count=>1, :running_pipelines=>[:main], :non_running_pipelines=>[]}
[2019-02-15T11:28:19,811][INFO ][logstash.agent ] Successfully started
Logstash API endpoint {:port=>9600}
- 打開瀏覽器,輸入
http://localhost:9600/
轧抗,頁面顯示以下信息則說明安裝成功。
{
"host": "CTUY7JWX6208621",
"version": "6.6.0",
"http_address": "127.0.0.1:9600",
"id": "0b82cf1c-e133-4407-8b8a-fad3f652d4cd",
"name": "CTUY7JWX6208621",
"build_date": "2019-01-24T12:13:56+00:00",
"build_sha": "e4390be7e4d511af9d48bc503c9dcc15b03d3bce",
"build_snapshot": false
}