<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之旅 廣告
                # Monitoring NGINX > 原文:[https://docs.gitlab.com/ee/user/project/integrations/prometheus_library/nginx.html](https://docs.gitlab.com/ee/user/project/integrations/prometheus_library/nginx.html) * [Requirements](#requirements) * [Metrics supported](#metrics-supported) * [Configuring Prometheus to monitor for NGINX metrics](#configuring-prometheus-to-monitor-for-nginx-metrics) * [Specifying the Environment label](#specifying-the-environment-label) # Monitoring NGINX[](#monitoring-nginx "Permalink") 在 GitLab 9.4 中[引入](https://gitlab.com/gitlab-org/gitlab-foss/-/merge_requests/12621) GitLab 支持自動檢測和監視 NGINX. 這是通過利用[NGINX VTS 導出器提供的](https://github.com/hnlq715/nginx-vts-exporter) ,該[導出](https://github.com/hnlq715/nginx-vts-exporter)器將[VTS 統計信息](https://github.com/vozlt/nginx-module-vts)轉換為 Prometheus 可讀形式. ## Requirements[](#requirements "Permalink") 必須啟用[Prometheus 服務](../prometheus.html) . ## Metrics supported[](#metrics-supported "Permalink") 檢測到 NGINX 服務器指標,該指標跟蹤 NGINX 直接提供的頁面和內容. | Name | Query | | --- | --- | | 吞吐量(要求/秒) | `sum(rate(nginx_server_requests{server_zone!="*", server_zone!="_", %{environment_filter}}[2m])) by (code)` | | 延遲(毫秒) | `avg(nginx_server_requestMsec{%{environment_filter}})` | | HTTP 錯誤率(HTTP 錯誤/秒) | `sum(rate(nginx_server_requests{code="5xx", %{environment_filter}}[2m]))` | | HTTP 錯誤(%) | `sum(rate(nginx_server_requests{code=~"5.*", host="*", %{environment_filter}}[2m])) / sum(rate(nginx_server_requests{code="total", host="*", %{environment_filter}}[2m])) * 100` | ## Configuring Prometheus to monitor for NGINX metrics[](#configuring-prometheus-to-monitor-for-nginx-metrics "Permalink") 要開始使用 NGINX 監視,您應該首先為 NGINX 服務器啟用[VTS 統計](https://github.com/vozlt/nginx-module-vts)模塊. 這將捕獲并以 HTML 可讀形式顯示統計信息. 接下來,您應該安裝并配置[NGINX VTS 導出器](https://github.com/hnlq715/nginx-vts-exporter) ,該[導出器](https://github.com/hnlq715/nginx-vts-exporter)將解析這些統計信息并將其轉換為 Prometheus 監視端點. 如果您將 NGINX 用作 Kubernetes 入口,GitLab 將在 0.9.0 及更高版本中啟用后[自動檢測](nginx_ingress.html)指標. ## Specifying the Environment label[](#specifying-the-environment-label "Permalink") 為了隔離并僅顯示給定環境的相關指標,GitLab 需要一種方法來檢測關聯了哪些標簽. 為此,GitLab 將[查找`environment`標簽](index.html#identifying-environments) .
                  <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>

                              哎呀哎呀视频在线观看