<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 功能強大 支持多語言、二開方便! 廣告
                # 使用Vistio監控Istio服務網格中的流量 Vistio GitHub地址:<https://github.com/nmnellis/vistio> [Vizceral](https://github.com/Netflix/vizceral)是Netflix發布的一個開源項目,用于近乎實時地監控應用程序和集群之間的網絡流量。Vistio是使用Vizceral對Istio和網格監控的改進。它利用Istio Mixer生成的指標,然后將其輸入Prometheus。Vistio查詢Prometheus并將數據存儲在本地以允許重播流量。 Vizceral有兩個可視化級別,全局可視化和集群級別可視化。在全局范圍內(如上所示),您可以通過Istio Ingress Gateway等入口點將從Internet到Istio服務網格網絡的網絡流量可視化,或者您可以在Istio服務網格網絡中顯示總網絡流量。 在集群級別(如下所示),您可以可視化內部網格的流量。通過設置警告和錯誤級別警報,當應用程序出現問題時可以被快速檢測出來。 ![Vistio的集群級別可視化](https://ws1.sinaimg.cn/large/00704eQkgy1fshft5oxlwj318g0pe0wp.jpg) ### 在Istio服務網格中安裝Vistio **依賴** - Prometheus - Istio 0.7或更高版本 **假設** 以下Demo使得這些假設更容易部署。如果您的環境設置不同,則可能需要將代碼下載到本地并編輯一些文件。 - Prometheus部署在`istio-system` namespace下,可以通過`http://prometheus.istio-system:9090`地址訪問 - Istio mixer啟用了`istio_request_count` metric - Kubernetes集群包含有`standard` StorageClass - 為了便于部署已安裝了Helm(可選) **前言** 如果您還尚未部署服務網格,可以按照此[Istio Bookinfo Demo](https://istio.io/docs/guides/bookinfo/)中的說明部署Istio及其示例應用程序。您需要能夠在應用程序之間生成流量。要測試指標是否從Mixer正確發送到Prometheus,您可以運行以下Prometheus查詢`istio_request_count`,應該會看到多個條目。 ![Prometheus查詢](https://ws1.sinaimg.cn/large/00704eQkgy1fshg0vw25ij318g0jzqjq.jpg) ### 部署Vistio 我們直接使用kubectl命令來部署。 **使用kubectl部署** ```bash kubectl apply -f https://raw.githubusercontent.com/rootsongjc/kubernetes-handbook/master/manifests/vistio/vistio-mesh-only.yaml -n default ``` ### 驗證和暴露Vistio Web/API 驗證應用程序已經啟動并在運行。使用`kubectl port-forward`命令暴露應用程序。 **驗證vistio-api** ```bash kubectl describe statefulset vistio-api -n default ``` **日志檢查(可選的)** 您應該能夠從vistio-api的日志中查看是否存在與Prometheus的連接/查詢相關的錯誤。 ```bash kubectl logs -n default -c vistio-api $(kubectl -n default get pod -l app=vistio-api -o jsonpath='{.items[0].metadata.name}') ``` **驗證vistio-web** ```bash kubectl describe deployment vistio-web -n default ``` **暴露vistio-api** 我們使用`kubectl port-forward`將vistio-api暴露到[http://localhost:9191](http://localhost:9191/)。 ```bash kubectl -n default port-forward $(kubectl -n default get pod -l app=vistio-api -o jsonpath='{.items[0].metadata.name}') 9091:9091 & ``` **驗證visito-api** vistio-web調用vistio-api來渲染服務網格。訪問<http://localhost:9091/graph>您應該會看到類似下列的輸出。 ![vistio-api的期望輸出](https://ws1.sinaimg.cn/large/00704eQkgy1fshi61t04oj310q17c0y1.jpg) **暴露Vistio** 在另一個命令行終端中,暴露Vizcera UI到[http://localhost:8080](http://localhost:8080/)。 ```bash kubectl -n default port-forward $(kubectl -n default get pod -l app=vistio-web -o jsonpath='{.items[0].metadata.name}') 8080:8080 & ``` **訪問Vistio** 如果一切都已經啟動并準備就緒,您就可以訪問Vistio UI,開始探索服務網格網絡,訪問[http://localhost:8080](http://localhost:8080/)您將會看到類似下圖的輸出。 ![Vistio主頁面](https://ws1.sinaimg.cn/large/00704eQkgy1fshi98duzgj318g0l2406.jpg) ### 探索 在全局范圍內,您將看到Istio網格內所有請求的總和。如果您部署了istio-ingressgateway,則可以選擇顯示通過其他配置從網格外部接收的流量,參考[使用Ingress Gateway部署Vistio](https://github.com/nmnellis/vistio#deploy-vistio-with-istio-ingress-gateway-helm)。 如果您點擊istio-mesh氣泡,您將能夠查看您的網狀網絡。 ![istio mesh的網絡流量](https://ws1.sinaimg.cn/large/00704eQkgy1fshibdwcj3j318g0p8th1.jpg) 在您的Istio網格中,您可以使用許多可視化工具來幫助您查明故障的應用程序。 ![查明網絡問題](https://ws1.sinaimg.cn/large/00704eQkgy1fshicc7or1j318g0p8ahr.jpg) 使用屏幕右上方的過濾器可以快速過濾出錯誤率較高的應用程序。通過高級配置,當錯誤率超過特定值時,也可以觸發警報。警報將顯示給定應用程序的當前錯誤率趨勢。 ### 問題排查 訪問<http://localhost:9091/graph>,如果您從vistio-api中看到以下輸出,表示某些功能無法正常工作。正確的輸出顯示在教程上面。 ![vistio api的不正確輸出](https://ws1.sinaimg.cn/large/00704eQkgy1fshie7wxkyj30ks0f4myd.jpg) **1.** 檢查vistio-api日志中是否有錯誤——在大多數情況下,vistio-api將記錄與Prometheus通信時遇到的任何問題。 ```bash kubectl logs -n default -c vistio-api $(kubectl -n default get pod -l app=vistio-api -o jsonpath='{.items[0].metadata.name}') ``` **2.** 驗證Prometheus查詢——vistio-api使用以下查詢檢索其數據。您應該確保Prometheus內部的數據都存在。 ```bash # Global Level Query sum(rate(istio_request_count[1m])) by (response_code) # Cluster Level Query sum(rate(istio_request_count[1m])) by (source_service,destination_service,response_code) ``` **3.** 提交Issue——如果遇到問題無法解決請提交Issue:<https://github.com/nmnellis/vistio/issues> ## 參考 - https://github.com/nmnellis/vistio - [Vistio—使用Netflix的Vizceral可視化Istio service mesh](https://servicemesher.github.io/blog/vistio-visualize-your-istio-mesh-using-netflixs-vizceral/)
                  <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>

                              哎呀哎呀视频在线观看