Skip to content

Commit

Permalink
feat(backend): 支持 sqlserver 容量使用率 #6443
Browse files Browse the repository at this point in the history
# Reviewed, transaction id: 16526
  • Loading branch information
zhangzhw8 authored and iSecloud committed Aug 27, 2024
1 parent 3d09112 commit d749f44
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions dbm-ui/backend/db_periodic_task/local_tasks/db_meta/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,32 @@
bkmonitor:exporter_dbm_mysqld_exporter:mysql_datadir_df_total_mb{instance_role="remote_master",%s}[5m]
) * 1024 * 1024))""",
},
ClusterType.SqlserverSingle: {
"range": 120,
"used": """sum by (cluster_domain) (
max_over_time(
bkmonitor:exporter_dbm_mssql_exporter:mssql_datadisk_used{instance_role="orphan",%s}[5m]
) * 1024 * 1024 * 1024 )""",
"total": """max by (cluster_domain) (
max_over_time(
bkmonitor:exporter_dbm_mssql_exporter:mssql_datadisk_total{instance_role="orphan",%s}[5m]
) * 1024 * 1024 * 1024 )""",
},
ClusterType.SqlserverHA: {
"range": 120,
"used": """sum by (cluster_domain) (
max by (cluster_domain, ip) (
max_over_time(
bkmonitor:exporter_dbm_mssql_exporter:mssql_datadisk_used{instance_role="backend_master",%s}[5m]
) * 1024 * 1024 * 1024
))""",
"total": """sum by (cluster_domain) (
max by (cluster_domain, ip) (
max_over_time(
bkmonitor:exporter_dbm_mssql_exporter:mssql_datadisk_total{instance_role="backend_master",%s}[5m]
) * 1024 * 1024 * 1024
))""",
},
# es采集器本身存在容量统计指标(elasticsearch_filesystem_data_size_bytes、elasticsearch_indices_store_size_bytes)
# 但数据节点只注册了一个,这里暂时用磁盘容量计算
ClusterType.Es: {
Expand Down

0 comments on commit d749f44

Please sign in to comment.