<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>

                ??一站式輕松地調用各大LLM模型接口,支持GPT4、智譜、豆包、星火、月之暗面及文生圖、文生視頻 廣告
                # Using the Metrics Dashboard > 原文:[https://docs.gitlab.com/ee/operations/metrics/dashboards/](https://docs.gitlab.com/ee/operations/metrics/dashboards/) * [Manage the metrics dashboard settings](#manage-the-metrics-dashboard-settings) * [Chart Context Menu](#chart-context-menu) * [View and edit the source file of a custom dashboard](#view-and-edit-the-source-file-of-a-custom-dashboard) * [Expand panel](#expand-panel) * [View Logs](#view-logs-ultimate) * [Timeline zoom and URL sharing](#timeline-zoom-and-url-sharing) * [Downloading data as CSV](#downloading-data-as-csv) * [Dashboard Annotations](#dashboard-annotations) * [Retention policy](#retention-policy) * [Add related links to custom dashboards](#add-related-links-to-custom-dashboards) * [Links Syntax](#links-syntax) * [Defining custom dashboards per project](#defining-custom-dashboards-per-project) * [Adding a new dashboard to your project](#adding-a-new-dashboard-to-your-project) * [Navigating to a custom dashboard](#navigating-to-a-custom-dashboard) * [Duplicating a GitLab-defined dashboard](#duplicating-a-gitlab-defined-dashboard) * [Troubleshooting](#troubleshooting) * [“No data found” error on Metrics dashboard page](#no-data-found-error-on-metrics-dashboard-page) # Using the Metrics Dashboard[](#using-the-metrics-dashboard "Permalink") ## Manage the metrics dashboard settings[](#manage-the-metrics-dashboard-settings "Permalink") 在 GitLab 13.2 中[引入](https://gitlab.com/gitlab-org/gitlab/-/issues/223204) . 要管理指標信息中心的設置,請執行以下操作: 1. 以具有項目維護者或管理員[權限](../../../user/permissions.html#project-members-permissions)的用戶身份登錄. 2. 導航至以下位置的信息中心 **操作>指標** . 3. 在資訊主頁的右上角,按一下 **指標設置** : [![Monitoring Dashboard actions menu with create new item](https://img.kancloud.cn/97/36/97367a291827fe2eca50c81240b02ebe_202x134.png)](../../../user/project/integrations/img/metrics_settings_button_v13_2.png) ## Chart Context Menu[](#chart-context-menu "Permalink") 在信息中心的每個面板上,您都可以通過以下方式訪問上下文菜單: 面板右上角上方的" **更多操作"**下拉框可采取與圖表數據相關的操作. [![Context Menu](https://img.kancloud.cn/c9/08/c908e4102e1ad43d7791a86c2758d262_1176x762.png)](../../../user/project/integrations/img/panel_context_menu_v13_0.png) 選項包括: * [Expand panel](#expand-panel) * [View logs](#view-logs-ultimate) * [Download CSV](#downloading-data-as-csv) * [Copy link to chart](../embed.html#embedding-gitlab-managed-kubernetes-metrics) * [Alerts](../alerts.html) ### View and edit the source file of a custom dashboard[](#view-and-edit-the-source-file-of-a-custom-dashboard "Permalink") 在 GitLab 12.5 中[引入](https://gitlab.com/gitlab-org/gitlab/-/issues/34779) . 查看項目的自定義儀表板時,可以通過單擊" **編輯儀表板"**按鈕來查看原始的`.yml`文件. ### Expand panel[](#expand-panel "Permalink") 在 GitLab 13.0 中[引入](https://gitlab.com/groups/gitlab-org/-/epics/3100) . 要查看較大的可視化版本,請點擊 **更多操作**圖標,然后選擇**展開面板** . 要返回指標儀表板,請單擊瀏覽器中的" **后退"**按鈕,或按`Esc`鍵. ### View Logs[](#view-logs-ultimate "Permalink") 在 GitLab 12.8 中[引入](https://gitlab.com/gitlab-org/gitlab/-/issues/122013) . 如果啟用了[日志](../../../user/project/clusters/kubernetes_pod_logs.html) ,則可以通過單擊右上角的上下文菜單從儀表板中的圖表導航以查看日志. 如果使用圖表底部的**時間軸縮放**功能,日志將縮小到您選擇的時間范圍. ### Timeline zoom and URL sharing[](#timeline-zoom-and-url-sharing "Permalink") 在 GitLab 12.8 中[引入](https://gitlab.com/gitlab-org/gitlab/-/issues/198910) . 您可以使用圖表底部的**時間軸縮放**功能來放大所選的日期和時間. 單擊并拖動滑塊以選擇要顯示的數據的其他開始或結束日期時,GitLab 會將所選的開始和結束時間添加到 URL,從而使您可以更輕松地共享特定的時間范圍. ### Downloading data as CSV[](#downloading-data-as-csv "Permalink") 指標儀表板上 Prometheus 圖表中的數據可以 CSV 格式下載. ## Dashboard Annotations[](#dashboard-annotations "Permalink") 版本歷史 * 在 GitLab 12.10 中[引入](https://gitlab.com/gitlab-org/gitlab/-/issues/211330) (由功能標志`metrics_dashboard_annotations`啟用). * 在 GitLab 13.0 中[刪除](https://gitlab.com/gitlab-org/gitlab/-/issues/215224)了[功能標志](https://gitlab.com/gitlab-org/gitlab/-/issues/215224) . 您可以使用" **指標儀表板注釋"**通過在每個指標儀表板上添加注釋來標記任何重要事件. 在查看儀表板時,分配給所選時間范圍的注釋條目將自動獲取并顯示在該儀表板內的每個圖表上. 鼠標懸停時,每個注釋都會顯示其他詳細信息,包括事件的確切時間及其描述. 您可以通過向[Metrics 儀表板注釋 API](../../../api/metrics_dashboard_annotations.html)發出請求來創建注釋 [![Annotations UI](https://img.kancloud.cn/1b/ff/1bffde64e54cbadf88ec044fbf62615f_1244x812.png)](../../../user/project/integrations/img/metrics_dashboard_annotations_ui_v13.0.png) ### Retention policy[](#retention-policy "Permalink") 在 GitLab 13.01 中[引入](https://gitlab.com/gitlab-org/gitlab/-/issues/211433) . 為了避免過時的注釋浪費過多的存儲空間,每天都會刪除附加到超過兩周時間段的記錄. 此重復后臺作業在本地服務器時間上午 1:00 運行. ## Add related links to custom dashboards[](#add-related-links-to-custom-dashboards "Permalink") 在 GitLab 13.1 中[引入](https://gitlab.com/gitlab-org/gitlab/-/issues/216385) . You can embed links to other dashboards or external services in your custom dashboard by adding **相關鏈接** to your dashboard’s YAML file. Related links open in the same tab as the dashboard. Related links can be displayed in the following locations on your dashboard: * 在儀表板頂部,作為頂層[`links`儀表板屬性](../../../operations/metrics/dashboards/yaml.html#dashboard-top-level-properties) . * 在圖表中,上下文菜單作為[面板](../../../operations/metrics/dashboards/yaml.html#panel-panels-properties)的[`links`屬性](../../../operations/metrics/dashboards/yaml.html#panel-panels-properties) . 相關鏈接可以包含以下屬性: * `url` :鏈接的完整 URL. 需要. * `title` :描述鏈接的短語. 可選的. 如果未設置此屬性,則將完整的 URL 用于鏈接標題. * `type` :一個聲明鏈接類型的字符串. 可選的. 如果設置為`grafana` ,則儀表板的時間范圍值將轉換為 Grafana 的時間范圍格式并附加到`url` . 儀表板的時間范圍作為 URL 參數附加到`url` . 以下示例顯示了添加到儀表板的兩個相關鏈接( `GitLab.com`和`GitLab Documentation` ): [![Links UI](https://img.kancloud.cn/8b/97/8b97900371ee326f89a4e572ce0057fa_512x123.png)](../../../user/project/integrations/img/related_links_v13_1.png) ### Links Syntax[](#links-syntax "Permalink") ``` links: - title: GitLab.com url: https://gitlab.com - title: GitLab Documentation url: https://docs.gitlab.com - title: Public Grafana playground dashboard url: https://play.grafana.org/d/000000012/grafana-play-home?orgId=1 type: grafana ``` ## Defining custom dashboards per project[](#defining-custom-dashboards-per-project "Permalink") 在 GitLab 12.1 中[引入](https://gitlab.com/gitlab-org/gitlab-foss/-/issues/59974) . 默認情況下,所有項目都包含一個由 GitLab 定義的 Prometheus 儀表板,其中包括一些關鍵指標,但是您也可以定義自己的自定義儀表板. 您可以從頭開始創建新文件,也可以復制 GitLab 定義的 Prometheus 儀表板. **注意:**與[自定義指標](../index.html#adding-custom-metrics)不同,以下[定義的指標](../index.html#adding-custom-metrics)不支持警報. ### Adding a new dashboard to your project[](#adding-a-new-dashboard-to-your-project "Permalink") GitLab 13.2 中[引入的](https://gitlab.com/gitlab-org/gitlab/-/issues/223204) UI 選項. 您可以通過將新的 YAML 文件添加到項目的`.gitlab/dashboards/`目錄中來配置自定義儀表`.gitlab/dashboards/` . 為了將儀表板顯示在項目的 **在"操作">"度量標準"**頁面上,文件必須具有`.yml`擴展名,并且應存在于項目的**默認**分支中. 要從 GitLab 用戶界面創建新的儀表板,請執行以下操作: 1. 以具有"維護者"或"所有者" [權限](../../../user/permissions.html#project-members-permissions)的用戶身份登錄到 GitLab. 2. 導航至以下位置的信息中心 **操作>指標** . 3. 在信息中心的右上角,點擊 **在"操作"**菜單上,然后選擇" **新建"** : [![使用創建新項目的](https://img.kancloud.cn/ea/78/ea7824a4cd13e0162c43f141699bd3a6_568x647.png)](../../../user/project/integrations/img/actions_menu_create_new_dashboard_v13_2.png) 4. 在模式窗口中,單擊**打開存儲庫** ,然后按照說明從命令行創建新的儀表板. 要從命令行創建新的儀表板: 1. 在存儲庫的根目錄下創建`.gitlab/dashboards/prom_alerts.yml` . 每個 YAML 文件都應定義儀表板的布局以及用于填充數據的 Prometheus 查詢. 此示例儀表板顯示一個面積圖: ``` dashboard: 'Dashboard Title' panel_groups: - group: 'Group Title' panels: - type: area-chart title: "Chart Title" y_label: "Y-Axis" y_axis: format: number precision: 0 metrics: - id: my_metric_id query_range: 'http_requests_total' label: "Instance: {{instance}}, method: {{method}}" unit: "count" ``` 2. 保存文件,提交并推送到您的存儲庫. 該文件必須存在于您的**默認**分支中. 3. 導航到項目的" **操作">"指標",**然后從下拉列表中選擇自定義儀表板. **注意:**不支持嵌套在`.gitlab/dashboards`子目錄下的配置文件,并且在 UI 中將不可用. ### Navigating to a custom dashboard[](#navigating-to-a-custom-dashboard "Permalink") 自定義儀表板通過其文件名唯一標識. 為了快速查看自定義儀表板,只需通過以下方式在 URL 中使用儀表板文件名: `https://gitlab-instance.example.com/project/-/metrics/custom_dashboard_name.yml` : `https://gitlab-instance.example.com/project/-/metrics/custom_dashboard_name.yml` . ### Duplicating a GitLab-defined dashboard[](#duplicating-a-gitlab-defined-dashboard "Permalink") 版本歷史 * 在 GitLab 12.7 中[引入](https://gitlab.com/gitlab-org/gitlab/-/issues/37238) . * 從[GitLab 12.8 開始](https://gitlab.com/gitlab-org/gitlab/-/issues/39505) ,自定義指標也將在您復制儀表板時被復制. 您可以保存 GitLab 定義的儀表板的完整副本以及添加到其中的所有自定義指標. 可以對生成的`.yml`文件進行自定義并使其適合您的項目. 您可以決定將儀表板`.yml`文件保存在項目的**默認**分支或新分支中. 1. 在儀表板下拉菜單或操作菜單中,單擊**重復儀表**板. **注意:**您只能復制 GitLab 定義的儀表板. 2. 輸入文件名和其他信息,例如新提交的消息,然后單擊**Duplicate** . 如果選擇**默認**分支,新的儀表板將立即可用. 如果選擇另一個分支,則應首先將此分支合并到**默認**分支. ## Troubleshooting[](#troubleshooting "Permalink") 對托管的 Prometheus 應用程序的問題進行故障排除時, [查看 Prometheus UI](../../../development/prometheus.html#access-the-ui-of-a-prometheus-managed-application-in-kubernetes)通常很有用. ### “No data found” error on Metrics dashboard page[](#no-data-found-error-on-metrics-dashboard-page "Permalink") 如果繼續出現"找不到數據"屏幕,則可能是由于: * 此環境尚未成功部署. * Prometheus 沒有此環境的性能數據,或者指標未正確標記. 要對此進行測試,請連接到 Prometheus 服務器并[運行查詢](../../../user/project/integrations/prometheus_library/kubernetes.html#metrics-supported) ,將`$CI_ENVIRONMENT_SLUG`替換`$CI_ENVIRONMENT_SLUG`您的環境名稱. * 您可能需要重新添加 GitLab 預定義的通用指標. 這可以通過運行[導入公用度量 Rake 任務來完成](../../../administration/raketasks/maintenance.html#import-common-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>

                              哎呀哎呀视频在线观看