Logstash study notes (2) First Event

 

1. The Logstash pipeline  has two required elements input and output, and an optional element, filter.

The input plugin consumes data from the data source

The filter plugin modifies data based on what you specify

The output plugin writes data to the target. e.g. files, elasticsearch, etc.

static/images/basic_logstash_pipeline.png

 

Second, let's test logstash and run the most basic logstash pipeline:

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

 

-e configure from command line

stdin Standard input

stdout Standard output

 

After starting Logstash, wait until you see "Pipeline main started",

Then type hello world at the command prompt and hit enter

 

see similar

2017-02-18T08:38:02.962Z CHR3PT7SLDRE4QB hello world prompt

timestamp + computer name (maybe IP too) + message

Exit Logstash by issuing the CTRL-D command in the shell where Logstash is running.

(I have been unable to get out of this place, and finally used CTRL c)

 

 

 

 

 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326386955&siteId=291194637