Elastic Stack #3:インストール 2



Logstashのインストール

以下サイトよりダウンロード
https://www.elastic.co/jp/products/logstash
[ダウンロード] - [ZIP] をクリック

ダウンロードした logstash-7.4.0.zip を解凍 C:\apps\logstash-7.4.0 へコピー

設定
c:\apps\logstash-7.4.0\config\logstash.conf を新規作成し以下内容を書き込む
input {
  stdin { }
}

output {
  stdout { codec => rubydebug }
}

動作テスト

コマンドプロンプトより以下コマンドを実行
D:\>cd /d c:\apps\logstash-7.4.0

c:\apps\logstash-7.4.0>.\bin\logstash -f .\config\logstash.conf
しばらく待つと Successfully started Logstash API endpoint の表示で待機となる。
Thread.exclusive is deprecated, use Thread::Mutex
Sending Logstash logs to c:/apps/logstash-7.4.0/logs which is now configured via log4j2.properties
[2019-10-10T12:23:46,021][WARN ][logstash.config.source.multilocal] Ignoring the 'pipelines.yml' file because modules or command line options are specified
[2019-10-10T12:23:46,039][INFO ][logstash.runner          ] Starting Logstash {"logstash.version"=>"7.4.0"}
[2019-10-10T12:23:48,327][INFO ][org.reflections.Reflections] Reflections took 48 ms to scan 1 urls, producing 20 keys and 40 values
[2019-10-10T12:23:51,869][WARN ][org.logstash.instrument.metrics.gauge.LazyDelegatingGauge][main] 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.
[2019-10-10T12:23:51,877][INFO ][logstash.javapipeline    ][main] Starting pipeline {:pipeline_id=>"main", "pipeline.workers"=>4, "pipeline.batch.size"=>125, "pipeline.batch.delay"=>50, "pipeline.max_inflight"=>500, :thread=>"#"}
[2019-10-10T12:23:52,014][INFO ][logstash.javapipeline    ][main] Pipeline started {"pipeline.id"=>"main"}
The stdin plugin is now waiting for input:
[2019-10-10T12:23:52,124][INFO ][logstash.agent           ] Pipelines running {:count=>1, :running_pipelines=>[:main], :non_running_pipelines=>[]}
[2019-10-10T12:23:52,518][INFO ][logstash.agent           ] Successfully started Logstash API endpoint {:port=>9600}
適当に "hello world" と入力してみる
hello world
C:/apps/logstash-7.4.0/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
{
       "message" => "hello world\r",
      "@version" => "1",
          "host" => "DESKTOP-37HDMPE",
    "@timestamp" => 2019-10-10T03:26:16.934Z
}
とりあえず問題なし?と思われる

※ 次回記事:#4 インストール 3

Elastic Stack, Elasticsearch

0 件のコメント:

その他の記事