<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] **`thanos sidecar` 命令運行一個與 Prometheus 實例一起部署的組件**。這允許 Sidecar 有選擇地將指標上傳到對象存儲,并允許查詢者使用通用、高效的 StoreAPI 查詢 Prometheus 數據。 詳細說明: - 它在 Prometheus 的遠程讀取 API 之上實現了 Thanos 的 Store API。這允許查詢者將 Prometheus 服務器視為時間序列數據的另一個來源,而無需直接與其 API 對話。 - 可選地,邊車將 TSDB 塊上傳到對象存儲桶,因為 Prometheus 每 2 小時生成一次。這允許 Prometheus 服務器以相對較低的保留率運行,同時它們的歷史數據通過對象存儲變得持久和可查詢。 > 注意:這仍然不意味著 Prometheus 可以完全無狀態,因為如果它崩潰并重新啟動,您將丟失大約 2 小時的指標,因此強烈建議 Prometheus 使用永久性磁盤。您可以獲得的最接近無狀態的是使用遠程寫入(Thanos 支持,請參閱 Receiver。遠程寫入還有其他風險和后果,如果崩潰,您仍然會丟失幾秒鐘的指標數據,因此在所有情況下都建議使用永久性磁盤。 - 可選的,Thanos sidecar 能夠監視 Prometheus 規則和配置,如果需要,解壓縮和替換環境變量,并 ping Prometheus 以重新加載它們。 通過 sidecar 連接到 Thanos 集群的 Prometheus 服務器受到一些安全操作的限制和建議: - 推薦的 Prometheus 版本為 2.2.1 或更高版本(包括最新版本)。這是由于 Prometheus 在以前的版本中不穩定以及缺少標志端點。 - (!) Prometheus 配置文件的 Prometheus external_labels 部分在整個 Thanos 系統中具有唯一的標簽。這些外部標簽將被邊車使用,然后在許多地方被thanos使用。 - 啟用 --web.enable-admin-api 標志以支持 sidecar 從 Prometheus 獲取元數據,如外部標簽。 - 如果要使用邊車重載功能(--reload.* 標志),則啟用 --web.enable-lifecycle 標志。 ## 下載thanos ```shell wget https://github.com/thanos-io/thanos/releases/download/v0.28.1/thanos-0.28.1.linux-amd64.tar.gz -O /opt/thanos-0.28.1.linux-amd64.tar.gz cd /opt && tar xf thanos-0.28.1.linux-amd64.tar.gz cp /opt/thanos-0.28.1.linux-amd64/thanos /usr/local/bin ``` ## 創建systemd服務 ```shell cat <<-EOF | sudo tee /usr/lib/systemd/system/thanos-sidecar.service > /dev/null [Unit] Description=thanos-sidecar Documentation=https://thanos.io/ Requires=network.target prometheus.service [Service] Type=simple User=ops Group=ops ExecStart=/usr/local/bin/thanos sidecar \\ --grpc-address=0.0.0.0:10901 --http-address=127.0.0.1:10902 \\ --prometheus.url=http://127.0.0.1:9090 \\ --tsdb.path=/data/prometheus/data --log.format=json ExecReload=/usr/bin/kill -HUP TimeoutStartSec=20s Restart=always [Install] WantedBy=multi-user.target EOF ``` ## 啟動服務 ```shell systemctl daemon-reload systemctl enable thanos-sidecar.service --now systemctl is-active thanos-sidecar.service ``` ## 驗證 ```shell $ curl localhost:10902/-/healthy && echo OK ``` ## 參考文檔 thanos sidecar官方文檔:https://thanos.io/tip/components/sidecar.md/
                  <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>

                              哎呀哎呀视频在线观看