<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                ThinkChat2.0新版上線,更智能更精彩,支持會話、畫圖、視頻、閱讀、搜索等,送10W Token,即刻開啟你的AI之旅 廣告
                [TOC] ### Shutting Down Logstash 如果你是以服務方式運行Logstash,使用下面的命令來停止它: + 在使用systemd的系統上: ```shell systemctl stop logstash ``` + 在使用upstart的系統上: ```shell initctl stop logstash ``` + 在使用sysv的系統上: ```shell /etc/init.d/logstash stop ``` 如果你在一個POSIX系統上的命令行中運行Logstash,你可以通過發送SIGTERM給Logstash進程來停止它。如: ```shell kill -TERM {logstash_pid} ``` 或者在命令行中按Ctrl+C ### What Happens During a Controlled Shutdown? 當你試圖關閉一個正在運行的Logstash實例的時候,Logstash在其安全關閉之前會執行一些步驟。包括: + 停止所有的input,filter和output插件 + 處理所有`in-flight`事件 + 中止Logstash進程 下面的情況會影響Logstash的關閉進程。 + Input插件在緩慢的接收數據 + 一個緩慢的過濾器,例如Ruby filter執行了一個`sleep(10000)`或者Elasticsearch filter執行了一個非常繁重的查詢。 + 一個已經斷開的output插件,等待重連來刷新`in-flight`事件。 這些情況讓Logstash成功關閉的持續事件變得不可預料。 Logstash有一個停機檢測機制,用來分析管道和插件在關閉期間的行為。 這個機制周期性的產生關于內部隊列中inflight事件的數量和繁忙線程列表的信息。(Logstash has a stall detection mechanism that analyzes the behavior of the pipeline and plugins during shutdown. This mechanism produces periodic information about the count of inflight events in internal queues and a list of busy worker threads.) 要讓Logstash能夠在關閉的時候強制中止,可以在啟動Logstash的時候使用`--pipeline.unsafe_shutdown`選項。 > <font color=#FF0000 size=4>WARNING</font>:不安全的關閉,強制殺死Logstash進程,或者其他原因的Logstash進程崩潰都可能造成數據丟失的后果(除非你起了[持久化隊列](https://www.elastic.co/guide/en/logstash/current/persistent-queues.html))。無論什么情況,請盡可能安全的關閉Logstash。 ### Stall Detection Example 這個示例中,緩慢的過濾會讓Logstash無法干凈的關閉。因為使用了`--pipeline.unsafe_shutdown`選項,這個關閉會導致20個事件的丟失。 ```shell bin/logstash -e 'input { generator { } } filter { ruby { code => "sleep 10000" } } output { stdout { codec => dots } }' -w 1 --pipeline.unsafe_shutdown Pipeline main started ^CSIGINT received. Shutting down the agent. {:level=>:warn} stopping pipeline {:id=>"main", :level=>:warn} 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} {"inflight_count"=>125, "stalling_thread_info"=>{["LogStash::Filters::Ruby", {"code"=>"sleep 10000"}]=>[{"thread_id"=>19, "name"=>"[main]>worker0", "current_call"=>"(ruby filter code):1:in `sleep'"}]}} {:level=>:warn} The shutdown process appears to be stalled due to busy or blocked plugins. Check the logs for more information. {:level=>:error} {"inflight_count"=>125, "stalling_thread_info"=>{["LogStash::Filters::Ruby", {"code"=>"sleep 10000"}]=>[{"thread_id"=>19, "name"=>"[main]>worker0", "current_call"=>"(ruby filter code):1:in `sleep'"}]}} {:level=>:warn} {"inflight_count"=>125, "stalling_thread_info"=>{["LogStash::Filters::Ruby", {"code"=>"sleep 10000"}]=>[{"thread_id"=>19, "name"=>"[main]>worker0", "current_call"=>"(ruby filter code):1:in `sleep'"}]}} {:level=>:warn} Forcefully quitting logstash.. {:level=>:fatal} ``` 如果`--pipeline.unsage_shutdown`沒有開啟,則Logstash會繼續運行,并周期性的生成這些信息。
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看