ubuntu16.04安裝logstash

下載ruby

cd /app
wget https://artifacts.elastic.co/downloads/logstash/logstash-7.3.1.tar.gz
tar zxvf logstash-7.3.1.tar.gz

測試app

bin/logstash -e 'input { stdin { } } output { stdout {} }'

root@localhost:/app/logstash-7.3.1# bin/logstash -e 'input { stdin { } } output { stdout {} }'
Thread.exclusive is deprecated, use Thread::Mutex
Sending Logstash logs to /app/logstash-7.3.1/logs which is now configured via log4j2.properties
[2019-09-11T14:46:01,604][WARN ][logstash.config.source.multilocal] Ignoring the 'pipelines.yml' file because modules or command line options are specified
[2019-09-11T14:46:05,986][WARN ][org.logstash.instrument.metrics.gauge.LazyDelegatingGauge] A gauge metric of an unknown type (org.jruby.RubyArray) has been create for key: cluster_uuids. This may result in invalid serialization.  It is recommended to log an issue to the responsible developer/development team.
The stdin plugin is now waiting for input:
1
/app/logstash-7.3.1/vendor/bundle/jruby/2.5.0/gems/awesome_print-1.7.0/lib/awesome_print/formatters/base_formatter.rb:31: warning: constant ::Fixnum is deprecated
{
      "@version" => "1",
    "@timestamp" => 2019-09-11T06:46:33.337Z,
       "message" => "1",
          "host" => "localhost"
}
2
{
      "@version" => "1",
    "@timestamp" => 2019-09-11T06:46:43.956Z,
       "message" => "2",
          "host" => "localhost"
}

其餘測試

https://www.kancloud.cn/aiyinsi-tan/logstash/849518ui

相關文章
相關標籤/搜索