Logstash下載有點麻煩,由於國內到elk官網速度很慢,下載過程中容易中斷。
所以,可以通過有斷點續傳的工具(迅雷)進行下載好,再進行安裝使用。
系統環境:
[root@test
~]# cat /etc/issue
CentOS
release 6.7 (Final)
Kernel \r on
an \m
[root@test
~]#
安裝基礎環境
#
yum install epel-release -y
# yum install java-1.8.0-openjdk.x86_64 -y
# yum install unzip -y
將下載好的包傳到測試機裏
[root@test
opt]# ll
總用量 143200
-rw-r--r--.
1 root root 27552007 7月 14 2016
elasticsearch-2.3.4.zip
-rw-r--r--.
1 root root 33321872 7月 14 2016
kibana-4.5.2-linux-x64.tar.gz
-rw-r--r--.
1 root root 85757162 7月 14 2016
logstash-2.3.4.zip
[root@test
opt]#
安裝Logstash
[root@test
opt]# unzip logstash-2.3.4.zip
[root@test
opt]# ll logstash-2.3.4
總用量 156
drwxr-xr-x.
2 root root 4096 4月 18 22:29 bin
-rw-rw-r--.
1 root root 104936 7月 7 2016
CHANGELOG.md
-rw-rw-r--.
1 root root 2249 7月 7 2016 CONTRIBUTORS
-rw-rw-r--.
1 root root 3885 7月 7 2016 Gemfile
-rw-rw-r--.
1 root root 21773 7月 7 2016 Gemfile.jruby-1.9.lock
drwxr-xr-x.
4 root root 4096 4月 18 22:29 lib
-rw-rw-r--.
1 root root 589 7月 7 2016 LICENSE
-rw-rw-r--.
1 root root 149 7月 7 2016 NOTICE.TXT
drwxr-xr-x.
4 root root 4096 4月 18 22:30 vendor
[root@test
opt]#
簡單驗證Logstash
[root@test
opt]# ./logstash-2.3.4/bin/logstash -e 'input {
stdin { } } output { stdout {} }'
Settings:
Default pipeline workers: 1
Pipeline main
started
Hello
World!
2016-04-18T14:33:16.570Z
0.0.0.0 Hello World!
^CSIGINT
received. Shutting down the agent. {:level=>:warn}
stopping
pipeline {:id=>"main"}
Received
shutdown signal, but pipeline is still waiting for in-flight events
to be
processed. Sending another ^C will force quit Logstash, but this may cause
data loss.
{:level=>:warn}
Pipeline main
has been shutdown
[root@test
opt]#