<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之旅 廣告
                # Embedding metric charts within GitLab-flavored Markdown > 原文:[https://docs.gitlab.com/ee/operations/metrics/embed.html](https://docs.gitlab.com/ee/operations/metrics/embed.html) * [Embedding GitLab-managed Kubernetes metrics](#embedding-gitlab-managed-kubernetes-metrics) * [Embedding metrics in issue templates](#embedding-metrics-in-issue-templates) * [Embedding metrics based on alerts in incident issues](#embedding-metrics-based-on-alerts-in-incident-issues) * [Embedding cluster health charts](#embedding-cluster-health-charts) # Embedding metric charts within GitLab-flavored Markdown[](#embedding-metric-charts-within-gitlab-flavored-markdown "Permalink") 您可以在[GitLab 風味降價](../../user/markdown.html#gitlab-flavored-markdown-gfm)字段中顯示指標圖表,例如發布或合并請求說明. GitLab 風味的 Markdown 字段中允許的最大嵌入圖表數為 100.當與其他人共享應用程序事件或性能指標并且您想直接獲得相關信息時,嵌入圖表很有用. ## Embedding GitLab-managed Kubernetes metrics[](#embedding-gitlab-managed-kubernetes-metrics "Permalink") 在 GitLab 12.2 中[引入](https://gitlab.com/gitlab-org/gitlab-foss/-/merge_requests/29691) . **Note:** Requires [Kubernetes](../../user/project/integrations/prometheus_library/kubernetes.html) metrics. 要顯示度量圖表,請在支持 GitLab 風格的 Markdown 的字段中包含`https://<root_url>/<project>/-/environments/<environment_id>/metrics`形式的鏈接: [![Embedded Metrics Markdown](https://img.kancloud.cn/e4/b8/e4b8c427f4a515c5eccef82a350c6255_1888x310.png)](../../user/project/integrations/img/embedded_metrics_markdown_v12_8.png) GitLab 將鏈接展開為嵌入式指標面板: [![Embedded Metrics Rendered](https://img.kancloud.cn/55/b9/55b91870bc72dd5fef2c28afc1c98bba_1942x1070.png)](../../user/project/integrations/img/embedded_metrics_rendered_v12_8.png) 您還可以嵌入一個圖表. 要獲取圖表鏈接,請點擊 圖表右上角的" **更多操作"**菜單,然后選擇" **將鏈接復制到圖表"** ,如本示例所示: [![Copy Link To Chart](https://img.kancloud.cn/f8/80/f8809a94e4aac829630658e3b865c7fd_600x390.png)](../../user/project/integrations/img/copy_link_to_chart_v12_10.png) 指標必須滿足以下要求: * `<environment_id>`必須與真實環境相對應. * 普羅米修斯必須在監視環境. * 必須將 GitLab 實例配置為從環境接收數據. * 必須允許用戶訪問環境( [Reporter 或更高版本](../../user/permissions.html) )的監視儀表板. * 儀表板必須在最近 8 小時內具有數據. 如果以上所有條件均成立,則該指標將展開,如下所示: [![Embedded Metrics](https://img.kancloud.cn/33/97/3397e19f493c81dab3b59b7da39412ab_1013x850.png)](../../user/project/integrations/img/view_embedded_metrics_v12_10.png) 公制圖表也可能被隱藏: [![Show Hide](https://img.kancloud.cn/58/06/58066d0b492017a71a54efe081659c69_1013x440.png)](../../user/project/integrations/img/hide_embedded_metrics_v12_10.png) 您可以直接在瀏覽器中打開鏈接[以獲取數據](dashboards/index.html#expand-panel)的[詳細視圖](dashboards/index.html#expand-panel) . ## Embedding metrics in issue templates[](#embedding-metrics-in-issue-templates "Permalink") 您也可以在問題模板中嵌入默認儀表板指標或單個指標. 要使圖表并排顯示,請使用逗號或空格將指向整個指標儀表板或單個指標的單獨鏈接分開. [![Embedded Metrics in issue templates](https://img.kancloud.cn/0e/0e/0e0e157b57d32bf640284d7cb646cf38_1178x1099.png)](../../user/project/integrations/img/embed_metrics_issue_template.png) ## Embedding metrics based on alerts in incident issues[](#embedding-metrics-based-on-alerts-in-incident-issues "Permalink") 對于由[GitLab 管理的警報規則](alerts.html) ,問題包括與警報相對應的查詢的嵌入式圖表. 該圖表顯示了事件開始點前后一個小時(前后 30 分鐘)的一小時數據. 對于[手動配置的 Prometheus 實例](../../user/project/integrations/prometheus.html#manual-configuration-of-prometheus) ,如果滿足以下要求,則可以包括與查詢相對應的圖表: * 該警報對應于通過 GitLab 管理的環境. * 警報對應于[范圍查詢](https://s0prometheus0io.icopy.site/docs/prometheus/latest/querying/api/) . * 警報包含下表中列出的必需屬性. | Attributes | Required | Description | | --- | --- | --- | | `annotations/gitlab_environment_name` | Yes | 與警報對應的由 GitLab 管理的環境的名稱 | | `annotations/title` , `annotations/summary` , `labels/alertname` | Yes | 用作圖表標題 | | `annotations/gitlab_y_label` | No | 用作圖表的 y 軸標簽 | ## Embedding cluster health charts[](#embedding-cluster-health-charts "Permalink") 版本歷史 * 在[GitLab Ultimate](https://about.gitlab.com/pricing/) 12.9 中[引入](https://gitlab.com/gitlab-org/gitlab/-/issues/40997) . * 在 13.2 中[移至](https://gitlab.com/gitlab-org/gitlab/-/issues/208224) GitLab 核心. [Cluster Health Metrics](../../user/project/clusters/index.html#visualizing-cluster-health)也可以嵌入到[GitLab 風格的 Markdown 中](../../user/markdown.html) . 要嵌入度量標準圖表,請在支持 GitLab 風格的 Markdown 的任何位置以`https://<root_url>/<project>/-/cluster/<cluster_id>?<query_params>`的形式包含指向該圖表的鏈接. 要生成并復制到圖表的鏈接,請遵循[Cluster Health Metric 文檔中的說明](../../user/project/clusters/index.html#visualizing-cluster-health) . 指標必須滿足以下要求: * `<cluster_id>`必須與實際群集相對應. * Prometheus 必須監視群集. * 必須允許用戶訪問項目集群指標. * 儀表板必須在" [集群運行狀況"頁面](../../user/project/clusters/index.html#visualizing-cluster-health)上報告數據 如果滿足上述要求,則度量標準將展開,如下所示. [![Embedded Cluster Metric in issue descriptions](https://img.kancloud.cn/c1/fe/c1fe62c637d6cf047c1d55436db67a68_1420x968.png)](../../user/project/integrations/img/prometheus_cluster_health_embed_v12_9.png)
                  <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>

                              哎呀哎呀视频在线观看