Skip to content
代码片段 群组 项目
未验证 提交 65e24484 编辑于 作者: Jose Ivan Vargas's avatar Jose Ivan Vargas 提交者: GitLab
浏览文件

Merge branch 'sy-rm-monitor-metrics-05' into 'master'

Remove unused metrics dashboard templates

See merge request https://gitlab.com/gitlab-org/gitlab/-/merge_requests/160488



Merged-by: default avatarJose Ivan Vargas <jvargas@gitlab.com>
Approved-by: default avatarJose Ivan Vargas <jvargas@gitlab.com>
Reviewed-by: default avatarJose Ivan Vargas <jvargas@gitlab.com>
Co-authored-by: default avatarsyasonik <syasonik@gitlab.com>
No related branches found
No related tags found
无相关合并请求
# Only one dashboard should be defined per file
# More info: https://docs.gitlab.com/ee/operations/metrics/dashboards/yaml.html
dashboard: 'Area Panel Example'
# For more information about the required properties of panel_groups
# please visit: https://docs.gitlab.com/ee/operations/metrics/dashboards/yaml.html#panel-group-panel_groups-properties
panel_groups:
- group: 'Server Statistics'
panels:
- title: Average amount of time spent by the CPU
type: area-chart
metrics:
- query_range: 'rate(node_cpu_seconds_total[15m])'
unit: 'Seconds'
label: "Time in Seconds"
# Only one dashboard should be defined per file
# More info: https://docs.gitlab.com/ee/operations/metrics/dashboards/yaml.html
dashboard: 'Single Stat'
# This is where all of the variables that can be manipulated via the UI
# are initialized
# Check out: https://docs.gitlab.com/ee/operations/metrics/dashboards/templating_variables.html#templating-variables-for-metrics-dashboards-core
templating:
variables:
job: 'prometheus'
# For more information about the required properties of panel_groups
# please visit: https://docs.gitlab.com/ee/operations/metrics/dashboards/yaml.html#panel-group-panel_groups-properties
panel_groups:
- group: 'Memory'
panels:
- title: Prometheus
type: single-stat
metrics:
# Queries that make use of variables need to have double curly brackets {}
# set to the variables, per the example below
- query: 'max(go_memstats_alloc_bytes{job="{{job}}"}) / 1024 /1024'
unit: '%'
label: "Max"
# Only one dashboard should be defined per file
# More info: https://docs.gitlab.com/ee/operations/metrics/dashboards/yaml.html
dashboard: 'Gauge Panel Example'
# For more information about the required properties of panel_groups
# please visit: https://docs.gitlab.com/ee/operations/metrics/dashboards/yaml.html#panel-group-panel_groups-properties
panel_groups:
- group: 'Server Statistics'
panels:
- title: "Memory usage"
# More information about gauge panel types can be found here:
# https://docs.gitlab.com/ee/operations/metrics/dashboards/panel_types.html#gauge
type: "gauge-chart"
min_value: 0
max_value: 1024
split: 10
thresholds:
mode: "percentage"
values: [60, 90]
format: "megabytes"
metrics:
- query: '(node_memory_MemTotal_bytes - (node_memory_MemFree_bytes + node_memory_Buffers_bytes + node_memory_Cached_bytes)) / 1024 / 1024'
unit: 'MB'
# Development guide for Metrics Dashboard templates
Please follow [the development guideline](../../../../doc/development/operations/metrics/templates.md)
# Only one dashboard should be defined per file
# More info: https://docs.gitlab.com/ee/operations/metrics/dashboards/yaml.html
dashboard: 'Area Panel Example'
# For more information about the required properties of panel_groups
# please visit: https://docs.gitlab.com/ee/operations/metrics/dashboards/yaml.html#panel-group-panel_groups-properties
panel_groups:
- group: 'Server Statistics'
panels:
- title: "Core Usage (Pod Average)"
type: area-chart
metrics:
- query_range: 'avg(sum(rate(container_cpu_usage_seconds_total{container!="POD",pod=~"^{{ci_environment_slug}}-([^c].*|c([^a]|a([^n]|n([^a]|a([^r]|r[^y])))).*|)-(.*)",namespace="{{kube_namespace}}"}[15m])) by (job)) without (job) / count(sum(rate(container_cpu_usage_seconds_total{container!="POD",pod=~"^{{ci_environment_slug}}-([^c].*|c([^a]|a([^n]|n([^a]|a([^r]|r[^y])))).*|)-(.*)",namespace="{{kube_namespace}}"}[15m])) by (pod)) OR avg(sum(rate(container_cpu_usage_seconds_total{container_name!="POD",pod_name=~"^{{ci_environment_slug}}-([^c].*|c([^a]|a([^n]|n([^a]|a([^r]|r[^y])))).*|)-(.*)",namespace="{{kube_namespace}}"}[15m])) by (job)) without (job) / count(sum(rate(container_cpu_usage_seconds_total{container_name!="POD",pod_name=~"^{{ci_environment_slug}}-([^c].*|c([^a]|a([^n]|n([^a]|a([^r]|r[^y])))).*|)-(.*)",namespace="{{kube_namespace}}"}[15m])) by (pod_name))'
unit: 'cores'
label: "Pod Average (in seconds)"
# Only one dashboard should be defined per file
# More info: https://docs.gitlab.com/ee/operations/metrics/dashboards/yaml.html
dashboard: 'Gauge K8s Panel Example'
# For more information about the required properties of panel_groups
# please visit: https://docs.gitlab.com/ee/operations/metrics/dashboards/yaml.html#panel-group-panel_groups-properties
panel_groups:
- group: 'Server Statistics'
panels:
- title: "Memory usage"
# More information about gauge panel types can be found here:
# https://docs.gitlab.com/ee/operations/metrics/dashboards/panel_types.html#gauge
type: "gauge-chart"
min_value: 0
max_value: 1024
split: 10
thresholds:
mode: "percentage"
values: [60, 90]
format: "megabytes"
metrics:
- query: 'avg(sum(container_memory_usage_bytes{container!="POD",pod=~"^{{ci_environment_slug}}-([^c].*|c([^a]|a([^n]|n([^a]|a([^r]|r[^y])))).*|)-(.*)",namespace="{{kube_namespace}}"}) by (job)) without (job) / count(avg(container_memory_usage_bytes{container!="POD",pod=~"^{{ci_environment_slug}}-([^c].*|c([^a]|a([^n]|n([^a]|a([^r]|r[^y])))).*|)-(.*)",namespace="{{kube_namespace}}"}) without (job)) /1024/1024 OR avg(sum(container_memory_usage_bytes{container_name!="POD",pod_name=~"^{{ci_environment_slug}}-([^c].*|c([^a]|a([^n]|n([^a]|a([^r]|r[^y])))).*|)-(.*)",namespace="{{kube_namespace}}"}) by (job)) without (job) / count(avg(container_memory_usage_bytes{container_name!="POD",pod_name=~"^{{ci_environment_slug}}-([^c].*|c([^a]|a([^n]|n([^a]|a([^r]|r[^y])))).*|)-(.*)",namespace="{{kube_namespace}}"}) without (job)) /1024/1024'
unit: 'MB'
# Only one dashboard should be defined per file
# More info: https://docs.gitlab.com/ee/operations/metrics/dashboards/yaml.html
dashboard: 'Single Stat Panel Example'
# For more information about the required properties of panel_groups
# please visit: https://docs.gitlab.com/ee/operations/metrics/dashboards/yaml.html#panel-group-panel_groups-properties
panel_groups:
- group: 'Server Statistics'
panels:
- title: "Memory usage"
# More information about heatmap panel types can be found here:
# https://docs.gitlab.com/ee/operations/metrics/dashboards/panel_types.html#single-stat
type: "single-stat"
metrics:
- query: 'avg(sum(container_memory_usage_bytes{container!="POD",pod=~"^{{ci_environment_slug}}-([^c].*|c([^a]|a([^n]|n([^a]|a([^r]|r[^y])))).*|)-(.*)",namespace="{{kube_namespace}}"}) by (job)) without (job) / count(avg(container_memory_usage_bytes{container!="POD",pod=~"^{{ci_environment_slug}}-([^c].*|c([^a]|a([^n]|n([^a]|a([^r]|r[^y])))).*|)-(.*)",namespace="{{kube_namespace}}"}) without (job)) /1024/1024 OR avg(sum(container_memory_usage_bytes{container_name!="POD",pod_name=~"^{{ci_environment_slug}}-([^c].*|c([^a]|a([^n]|n([^a]|a([^r]|r[^y])))).*|)-(.*)",namespace="{{kube_namespace}}"}) by (job)) without (job) / count(avg(container_memory_usage_bytes{container_name!="POD",pod_name=~"^{{ci_environment_slug}}-([^c].*|c([^a]|a([^n]|n([^a]|a([^r]|r[^y])))).*|)-(.*)",namespace="{{kube_namespace}}"}) without (job)) /1024/1024'
unit: 'MB'
label: "Used memory"
# Only one dashboard should be defined per file
# More info: https://docs.gitlab.com/ee/operations/metrics/dashboards/yaml.html
dashboard: 'Heatmap Panel Example'
# For more information about the required properties of panel_groups
# please visit: https://docs.gitlab.com/ee/operations/metrics/dashboards/yaml.html#panel-group-panel_groups-properties
panel_groups:
- group: 'Server Statistics'
panels:
- title: "Memory usage"
# More information about heatmap panel types can be found here:
# https://docs.gitlab.com/ee/operations/metrics/dashboards/panel_types.html#single-stat
type: "single-stat"
metrics:
- query: '(node_memory_MemTotal_bytes - (node_memory_MemFree_bytes + node_memory_Buffers_bytes + node_memory_Cached_bytes)) / 1024 / 1024'
unit: 'MB'
label: "Used memory"
0% 加载中 .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册