<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] ## metrics - 收集的服務器運行指標 - [Prometheus普羅米修斯](https://prometheus.io/docs/instrumenting/exposition_formats/#text-based-format)或[OpenMetrics格式](https://pkg.go.dev/github.com/prometheus/client_golang@v1.7.1/prometheus/promhttp#HandlerOpts)(`application/openmetrics-text`)協商返回指標 - 返回內容說明[metrics 文檔](https://caddyserver.com/docs/metrics) ### Prometheus 普羅米修斯 - [Prometheus](https://prometheus.io/)是一個監視平臺,它通過在這些目標上收集度量標準HTTP端點來從被監視的目標收集度量標準。除了使用[Grafana](https://grafana.com/docs/grafana/latest/getting-started/what-is-grafana/)等儀表盤工具幫助您顯示指標[外](https://grafana.com/docs/grafana/latest/getting-started/what-is-grafana/),Prometheus還用于[警報](https://prometheus.io/docs/alerting/latest/overview/) - 像Caddy一樣,Prometheus用Go編寫 運行普羅米修斯 ``` # prometheus.yaml global: scrape_interval: 15s # default is 1 minute scrape_configs: - job_name: caddy static_configs: - targets: ['localhost:2019'] ``` 執行 ``` prometheus --config.file=prometheus.yaml ``` ### metrics 指標 詳情點擊[metrics 指標](https://caddyserver.com/docs/metrics) 分為三類 #### 運行時指標 - 這些度量標準涵蓋了Caddy流程的內部,并且由Prometheus Go Client自動提供。 - 以`go_*`和開頭`process_*` #### 管理員API指標 - 這些指標有助于監控Caddy管理員API。每個管理端點都可以跟蹤請求計數和錯誤。 - 這些指標以開頭`caddy_admin_*`。 ``` > curl -s http://localhost:2019/metrics | grep ^caddy_admin caddy_admin_http_requests_total{code="200",handler="admin",method="GET",path="/config/"} 1 caddy_admin_http_requests_total{code="200",handler="admin",method="GET",path="/debug/pprof/"} 2 caddy_admin_http_requests_total{code="200",handler="admin",method="GET",path="/debug/pprof/cmdline"} 1 caddy_admin_http_requests_total{code="200",handler="load",method="POST",path="/load"} 1 caddy_admin_http_requests_total{code="200",handler="metrics",method="GET",path="/metrics"} 3 ``` #### HTTP中間件指標 所有Caddy HTTP中間件處理程序都會自動進行檢測,以確定請求等待時間,到第一個字節的時間,錯誤以及請求/響應正文大小 ### 實例 ``` # 指定統計的地址 , 訪問 /metrics 獲取信息 metrics /metrics ```
                  <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>

                              哎呀哎呀视频在线观看