<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>

                ??碼云GVP開源項目 12k star Uniapp+ElementUI 功能強大 支持多語言、二開方便! 廣告
                [TOC] ### 管道配置文件的結構 對于每一種你想要添加到事件處理管道中的插件,Logstash管道配置文件中都有一個獨立的配置段.示例: ```json # This is a comment. You should use comments to describe # parts of your configuration. input { ... } filter { ... } output { ... } ``` 每個配置段包含一個或多個插件的配置.如果你定義了多個filter,他們會按照配置文件中出現的順序生效. ### 插件配置 一個插件的配置由插件名和其后跟隨的一塊此插件的設置組成.如,這個配置段包含兩個文件的inputs: ```con input { file { path => "/var/log/message" type => "syslog" } file { path => "/var/log/apache/access.log" type => "apache" } } ``` 這個示例中,配置了兩個設置給兩個不同的inputs類型:path 和 type. 你可以根據插件的不同類型進行不同的配置.更多關于每個插件的信息可以查看:[Input Plugins](https://www.elastic.co/guide/en/logstash/current/input-plugins.html), [Output Plugins](https://www.elastic.co/guide/en/logstash/current/output-plugins.html), [Filter Plugins](https://www.elastic.co/guide/en/logstash/current/filter-plugins.html), and [Codec Plugins](https://www.elastic.co/guide/en/logstash/current/codec-plugins.html). ### 值類型 插件的某個設定的值可以使用某些類型的值來指定.如布爾,列表,或哈希.下面是支持的數據類型. #### 數組 現在這種類型基本不再使用,而是使用標準類型如`string`來定義為形如`:list => true`以方便檢查.對于仍然需要處理哈希列表或混合之類不需要檢查的地方仍然需要. 原文:This type is now mostly deprecated in favor of using a standard type like string with the plugin defining the :list => true property for better type checking. It is still needed to handle lists of hashes or mixed types where type checking is not desired. 示例: ```conf users => [ {id => 1, name => bob}, {id => 2, name => jane } ] ``` #### 列表 本身不是類型,但是可以有屬性類型.This makes it possible to type check multiple values. Plugin authors can enable list checking by specifying `:list => true` when declaring an argument. 示例: ```conf path => [ "/var/log/messages", "/var/log/*.log" ] uris => [ "http://elastic.co", "http://example.net" ] ``` 這個示例配置`path`,一個包含三個字符串中的每個元素的`string`列表.同時使用`uris`配置了一個URI列表,如果包含不可用的URIs,配置將會失敗.原文:This example configures path, which is a string to be a list that contains an element for each of the three strings. It also will configure the uris parameter to be a list of URIs, failing if any of the URIs provided are not valid. > <font color=#1E90FF size=4>TIP</font> :我只看到兩個字符串,但是原文是三個.可能我理解有誤.但我覺得是文檔寫錯了. #### 布爾 一個布爾值必然是`true`或`false`.注意`true`和`false`關鍵字不要使用引號引起來. 示例: ```conf ssl_enable => true ``` #### 字節 字節字段是表示有效字節單位的字符串的字段.是一種很方便的方式在你的插件配置中聲明特定的大小. SI (k M G T P E Z Y)和二進制(Ki Mi Gi Ti Pi Ei Zi Yi)單位都是支持的.二進制使用base-1024換算,SI使用1000換算.這個字段不區分大小寫,并且在值和單位之間可以有空格.如果沒有指定單位,則表示字節. 示例: ```conf my_bytes => "1113" # 1113 bytes my_bytes => "10MiB" # 10485760 bytes my_bytes => "100kib" # 102400 bytes my_bytes => "180 mb" # 180000000 bytes ``` 一個codec是Logstash codec用來表示數據的名字.Codec可以同時用在inputs和outputs. Input codecs提供了一中在你的數據進入input之前解碼數據的簡單的方法.Output codecs提供了一種在你的數據從output出去之前編碼的簡單的方法.使用input和output codecs可以不必在你的Logstash管道中設置單獨的filter. 可以在[Codec Plugins](https://www.elastic.co/guide/en/logstash/current/codec-plugins.html)頁面查看可用的codecs列表. 示例: ```conf codec => "json" ``` #### 哈希 一個哈希是一個格式為`"fild1" => "value1"`的K/V集合.注意多個鍵值對使用空格而不是逗號分隔. 示例: ```conf match => { "field1" => "value1" "field2" => "value2" ... } ``` #### 數字 數字必須是一個有效的數值(浮點型或整型). 示例: ```conf port => 33 ``` #### 密碼 密碼是一個不會被記錄日志或輸出的單一的字符串值. 示例: ```conf my_password => "password" ``` #### URI URI可以是完整的URL,如http://elastic.co/,也可以是像foobar這樣的簡單標識符。如果一個URI包含密碼類似*http://user:pass@example.net*,其中的密碼部分將不會被記錄日志或顯示. 示例: ```conf my_uri => "http://foo:bar@example.net" ``` #### Path 一個Path是一個用來表示一個有效的操作系統path的字符串. 示例: ```conf my_path => "/tmp/logstash" ``` #### 字符串 字符串必須是一個單字符序列.注意字符串的值需要用引號引起來,單引號雙引號都可以. #### 轉義序列 默認情況下轉義序列是未開啟的.如果你想在引用的字符串中使用轉義序列.你需要在`logstash.yml`文件中設置`config.support_escapes: true`.當設置為`true`時,帶引號(單引號和雙引號)的字符串將按照下面的進行轉義: | Text | Result | | ---- | ---------------- | | \r | 回車(ASCII 13) | | \n | 換行(ASCII 10) | | \t | tab(ASCII 9) | | \\\ | 反斜杠(ASCII 92) | | \\" | 雙引號(ASCII 34) | | \\' | 單引號(ASCII 39) | 示例: ```conf name => "Hello world" name => 'It\'s a beautiful day' ``` ### 注釋 注釋方式同perl,ruby,python相同.在注釋內容的前面加一個#號,并且不需要在行首.如: ```conf # this is a comment input { # comments can appear at the end of a line, too #... } ```
                  <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>

                              哎呀哎呀视频在线观看