mirror of
https://github.com/elastic/logstash.git
synced 2025-04-25 07:07:54 -04:00
parent
3029f70e37
commit
fd129e20d4
3 changed files with 27 additions and 31 deletions
40
docs/static/advanced-pipeline.asciidoc
vendored
40
docs/static/advanced-pipeline.asciidoc
vendored
|
@ -576,36 +576,30 @@ you start Logstash.
|
||||||
==== Stall Detection Example
|
==== Stall Detection Example
|
||||||
|
|
||||||
In this example, slow filter execution prevents the pipeline from clean shutdown. By starting Logstash with the
|
In this example, slow filter execution prevents the pipeline from clean shutdown. By starting Logstash with the
|
||||||
`--allow-unsafe-shutdown` flag, quitting with *Ctrl+C* results in an eventual shutdown that loses 20 events.
|
`--allow-unsafe-shutdown` flag, quitting with *Ctrl+C* results in an eventual shutdown that loses events.
|
||||||
|
|
||||||
========
|
========
|
||||||
[source,shell]
|
[source,shell]
|
||||||
% bin/logstash -e 'input { generator { } } filter { ruby { code => "sleep 10000" } } \
|
bin/logstash -e 'input { generator { } } filter { ruby { code => "sleep 10000" } }
|
||||||
output { stdout { codec => dots } }' -w 1 --allow-unsafe-shutdown
|
output { stdout { codec => dots } }' -w 1 --allow-unsafe-shutdown
|
||||||
Default settings used: Filter workers: 1
|
Settings: User set pipeline workers: 1, Default pipeline workers: 8
|
||||||
Logstash startup completed
|
Pipeline main started
|
||||||
^CSIGINT received. Shutting down the pipeline. {:level=>:warn}
|
^CSIGINT received. Shutting down the agent. {:level=>:warn}
|
||||||
|
stopping pipeline {:id=>"main"}
|
||||||
Received shutdown signal, but pipeline is still waiting for in-flight events
|
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
|
to be processed. Sending another ^C will force quit Logstash, but this may cause
|
||||||
data loss. {:level=>:warn}
|
data loss. {:level=>:warn}
|
||||||
{:level=>:warn, "INFLIGHT_EVENT_COUNT"=>{"input_to_filter"=>20, "total"=>20},
|
{"inflight_count"=>125, "stalling_thread_info"=>{["LogStash::Filters::Ruby",
|
||||||
"STALLING_THREADS"=>
|
{"code"=>"sleep 10000"}]=>[{"thread_id"=>17, "name"=>"[main]>worker0",
|
||||||
{["LogStash::Filters::Ruby", {"code"=>"sleep 10000"}]=>[{"thread_id"=>15,
|
"current_call"=>"(ruby filter code):1:in `sleep'"}]}} {:level=>:warn}
|
||||||
"name"=>"|filterworker.0", "current_call"=>"
|
The shutdown process appears to be stalled due to busy or blocked plugins.
|
||||||
(ruby filter code):1:in `sleep'"}]}}
|
Check the logs for more information. {:level=>:error}
|
||||||
The shutdown process appears to be stalled due to busy or blocked plugins. Check
|
{"inflight_count"=>125, "stalling_thread_info"=>{["LogStash::Filters::Ruby",
|
||||||
the logs for more information.
|
{"code"=>"sleep 10000"}]=>[{"thread_id"=>17, "name"=>"[main]>worker0",
|
||||||
{:level=>:error}
|
"current_call"=>"(ruby filter code):1:in `sleep'"}]}} {:level=>:warn}
|
||||||
{:level=>:warn, "INFLIGHT_EVENT_COUNT"=>{"input_to_filter"=>20, "total"=>20},
|
{"inflight_count"=>125, "stalling_thread_info"=>{["LogStash::Filters::Ruby",
|
||||||
"STALLING_THREADS"=>
|
{"code"=>"sleep 10000"}]=>[{"thread_id"=>17, "name"=>"[main]>worker0",
|
||||||
{["LogStash::Filters::Ruby", {"code"=>"sleep 10000"}]=>[{"thread_id"=>15,
|
"current_call"=>"(ruby filter code):1:in `sleep'"}]}} {:level=>:warn}
|
||||||
"name"=>"|filterworker.0", "current_call"=>"
|
|
||||||
(ruby filter code):1:in `sleep'"}]}}
|
|
||||||
{:level=>:warn, "INFLIGHT_EVENT_COUNT"=>{"input_to_filter"=>20, "total"=>20},
|
|
||||||
"STALLING_THREADS"=>
|
|
||||||
{["LogStash::Filters::Ruby", {"code"=>"sleep 10000"}]=>[{"thread_id"=>15,
|
|
||||||
"name"=>"|filterworker.0", "current_call"=>"
|
|
||||||
(ruby filter code):1:in `sleep'"}]}}
|
|
||||||
Forcefully quitting logstash.. {:level=>:fatal}
|
Forcefully quitting logstash.. {:level=>:fatal}
|
||||||
========
|
========
|
||||||
|
|
||||||
|
|
14
docs/static/configuration.asciidoc
vendored
14
docs/static/configuration.asciidoc
vendored
|
@ -491,12 +491,13 @@ Let's see what comes out:
|
||||||
----------------------------------
|
----------------------------------
|
||||||
|
|
||||||
$ bin/logstash -f ../test.conf
|
$ bin/logstash -f ../test.conf
|
||||||
Logstash startup completed
|
Settings: Default pipeline workers: 8
|
||||||
|
Pipeline main started
|
||||||
asdf
|
asdf
|
||||||
{
|
{
|
||||||
"message" => "asdf",
|
"message" => "asdf",
|
||||||
"@version" => "1",
|
"@version" => "1",
|
||||||
"@timestamp" => "2015-03-18T23:09:29.595Z",
|
"@timestamp" => "2016-06-30T02:08:03.148Z",
|
||||||
"host" => "example.com",
|
"host" => "example.com",
|
||||||
"show" => "This data will be in the output"
|
"show" => "This data will be in the output"
|
||||||
}
|
}
|
||||||
|
@ -520,12 +521,13 @@ Let's see what the output looks like with this change:
|
||||||
[source,ruby]
|
[source,ruby]
|
||||||
----------------------------------
|
----------------------------------
|
||||||
$ bin/logstash -f ../test.conf
|
$ bin/logstash -f ../test.conf
|
||||||
Logstash startup completed
|
Settings: Default pipeline workers: 8
|
||||||
|
Pipeline main started
|
||||||
asdf
|
asdf
|
||||||
{
|
{
|
||||||
"message" => "asdf",
|
"message" => "asdf",
|
||||||
"@version" => "1",
|
"@version" => "1",
|
||||||
"@timestamp" => "2015-03-18T23:10:19.859Z",
|
"@timestamp" => "2016-06-30T02:10:25.044Z",
|
||||||
"host" => "example.com",
|
"host" => "example.com",
|
||||||
"show" => "This data will be in the output",
|
"show" => "This data will be in the output",
|
||||||
"@metadata" => {
|
"@metadata" => {
|
||||||
|
@ -572,8 +574,8 @@ configuration a sample date string and see what comes out:
|
||||||
[source,ruby]
|
[source,ruby]
|
||||||
----------------------------------
|
----------------------------------
|
||||||
$ bin/logstash -f ../test.conf
|
$ bin/logstash -f ../test.conf
|
||||||
Logstash startup completed
|
Settings: Default pipeline workers: 8
|
||||||
02/Mar/2014:15:36:43 +0100
|
Pipeline main started
|
||||||
{
|
{
|
||||||
"message" => "02/Mar/2014:15:36:43 +0100",
|
"message" => "02/Mar/2014:15:36:43 +0100",
|
||||||
"@version" => "1",
|
"@version" => "1",
|
||||||
|
|
|
@ -144,7 +144,7 @@ command line lets you quickly test configurations without having to edit a file
|
||||||
This pipeline takes input from the standard input, `stdin`, and moves that input to the standard output, `stdout`, in a
|
This pipeline takes input from the standard input, `stdin`, and moves that input to the standard output, `stdout`, in a
|
||||||
structured format.
|
structured format.
|
||||||
|
|
||||||
Once "Logstash startup completed" is displayed, type hello world at the command prompt to see Logstash respond:
|
Once "Pipeline main started" is displayed, type hello world at the command prompt to see Logstash respond:
|
||||||
|
|
||||||
[source,shell]
|
[source,shell]
|
||||||
hello world
|
hello world
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue