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

                企業??AI智能體構建引擎,智能編排和調試,一鍵部署,支持知識庫和私有化部署方案 廣告
                [TOC] ### Secrets keystore for secure settings 當你配置Logstash的時候,你可能需要指定敏感設置或配置,如密碼。你可以使用Logstash keystore安全的存儲這些秘密的數據以便在配置中使用,而不是依賴文件系統權限來保護這些數據。 在往keystore添加一個key和其Secret value之后,你就可以在配置敏感設置的時候使用key來替代Secret value。 引用key的方式(語法)和引用[變量](https://www.elastic.co/guide/en/logstash/current/environment-variables.html)的方式(語法)是一樣的: `${KEY}` 花括號中是key的名字。 如:假定keystore中包含一個名為`ES_PWD`值為`yourelasticsearchpassword`: + 在配置文件中,使用方式:`output { elasticsearch {...password => "${ES_PWD}" } } }`(不是我多了一個括號,文檔中就是多了一個括號。) + 在`logstash.yml`文件使用方式:`xpack.management.elasticsearch.password: ${ES_PWD}` 注意Logstash keystore有別于Elasticsearch keystore。Elasticsearch的keystore讓你以名字的方式存儲`elasticsearch.yml`中的值,Logstash的keystore允許你自定義在Logstash配置中引用的名字。(原文:Whereas the Elasticsearch keystore lets you store `elasticsearch.yml` values by name, the Logstash keystore lets you specify arbitrary names that you can reference in the Logstash configuration.) > <font color=#DC143C size=4>NOTE</font>:目前不支持從`pipeline.yml`文件和命令行(-e)選項引用keystore 數據。 > <font color=#DC143C size=4>NOTE</font>:從[centralized pipeline management](http://www.elastic.co/guide/en/logstash/6.x/logstash-centralized-pipeline-management.html)引用keystore數據,需要每一個部署Logstash的實例本地有一個keystore副本。 當Logstash分析設置(`logstash.yml`)或配置(`/etc/logstash/conf.d/*.conf`)的時候,會在解析變量之前從keystore解析key。 ### Keystore password 你可以通過在環境變量`LOGSTASH_KEYSTORE_PASS`中存儲密碼來保護對Logstash keystore的訪問。如果你在設置了這個變量之后創建Logstash keystore,這個keystore會被密碼保護。這意味著這個環境變量必須可以被運行的Logstash實例訪問。對于任何需要發出keystore命令的用戶,也必須正確設置此環境變量。 我們推薦使用keystore密碼,但這并不是強制的。即使你沒有設置密碼,數據依然會被加密。但是,我們仍然強烈建議您設置密碼,并且對任何可能包含密碼的環境變量的文件進行權限控制。如果你決定不設置密碼,你可以跳過此章節。 示例: ```shell set +o history export LOGSTASH_KEYSTORE_PASS=mypassword set -o history bin/logstash-keystore create ``` 此設置要求運行Logstash的用戶定義環境變量LOGSTASH_KeyStore_PASS=mypassword。如果未定義環境變量,則Logstash無法訪問keystore。(原文:This setup requires the user running Logstash to have the environment variable`LOGSTASH_KEYSTORE_PASS=mypassword` defined. If the environment variable is not defined, Logstash cannot access the the keystore.) 當你運行RPM或DEB包安裝的Logstash的時候,環境變量來自于`/etc/sysconfig/logstash`。 > <font color=#DC143C size=4>NOTE</font>:你可能需要手動創建`/etc/sysconfig/logstash`文件。文件的屬主必須是`root`權限`600`。文件內容的格式是`ENVIRONMENT_VARIABLE=VALUE`,每行一個條目。 對于如其他分發版,如Docker或ZIP,查看你的運行環境的文檔(Windows,Docker,etc)來學習如何給運行Logstash的用戶設置變量。并確保變量(以及密碼)只能被那個用戶訪問。 ### Keystore location(Keystore的位置) Keystore必須位于Logstash的`path.settings`目錄。此目錄和包含`logstash.yml`文件的目錄是同一個目錄。當對Keystore執行任何操作的時候,建議為Keystore 命令設置`path.settings`。如,對于使用RPM和DEB安裝的Logstash創建一個keystore: ```shell set +o history export LOGSTASH_KEYSTORE_PASS=mypassword set -o history sudo -E /usr/share/logstash/bin/logstash-keystore --path.settings /etc/logstash create ``` 查看[Logstash目錄布局](https://www.elastic.co/guide/en/logstash/current/dir-layout.html)來獲取更多關于默認目錄位置的信息。 > <font color=#DC143C size=4>NOTE</font>:如果給`path.settings`指定了一個和`logstash.yml`所在目錄不同的目錄,你將會收到一個警告。 ### Create a keystore 使用`create`來創建一個keystore: ```shell bin/logstash-keystore create ``` 創建的keystore所在目錄是在`path.settings`配置中定義的。 > <font color=#DC143C size=4>NOTE</font>:創建keystore的時候建議設置一個[keystore password](https://www.elastic.co/guide/en/logstash/current/keystore.html#keystore-password)。 ### Add keys 要存儲敏感信息,如Elasticsearch的認證憑據,使用`add`命令: ```shell bin/logstash-keystore add ES_PWD ``` 當出現提示的時候,為key輸入一個值。 ### List keys 要查看keystore中定義的key列表,使用: ```shell bin/logstash-keystore list ``` ### Remove keys 從keystore中移除key,使用: ```shell bin/logstash-keystore remove ES_PWD ```
                  <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>

                              哎呀哎呀视频在线观看