版本: 0.0.1
日期: {{print .Date}}
版权声明: 平凯星辰(北京)科技有限公司版权所有,保留一切权利。未经本公司许可,任何单位和个人不得擅自摘抄、复制本文档内容,并以任何形式传播。
本次对用户的集群进行巡检,共计 {{index .SysStatistics.ServicePort "used"}} 个节点 {{if index .SysStatistics.ServicePort "failed" -}} , 其中有{{index .SysStatistics.ServicePort "failed"}}个节点不在线 {{- end}}。
| 服务汇总信息统计简表 | |
|---|---|
| 集群名 | {{.ClusterReport.OriData.ClusterInfo.ClusterName}} |
| 集群 ID | {{.ClusterReport.OriData.ClusterInfo.ClusterID}} |
| 服务器数量 | {{index .SysStatistics.ServicePort "used"}} |
本次数据库巡检工具是:
上述工具分析来自配置文件、工作日志以及 Prometheus 的数据,自动生成此报告。
这次检查对主机和数据库配置和数据库性能进行了总体分析,不针对具体某个应用性能。
本报告提供的检查和建议不涉及具体的数据库安全分析和应用程序细节。
系统总体运行情况: {{- if .SysStatistics.SummaryConclusionBad}} {{print .PriorKnowledge.Suggestions.SummaryConclusionNo}} {{else}} {{print .PriorKnowledge.Suggestions.SummaryConclusionYes}} {{- end}},系统资源使用如下:
Time: {{ $time | $sys.TimestampParse | printf "%s" }}, cpu_usage: {{ $value | printf "%.2f"}}%
{{- end}} {{else}} {{print $kn.Suggestions.HaveOutliersNo}} {{- end}} {{- end}}Time: {{ $time | $sys.TimestampParse | printf "%s" }}, memory_available: {{ $value | printf "%.2f"}}MB
{{- end}} {{else}} {{print $kn.Suggestions.HaveOutliersNo}} {{- end}} {{- end}}Time: {{ $time | $sys.TimestampParse | printf "%s" }}, network_traffic: {{ $value | printf "%.2f"}}MB
{{- end}} {{else}} {{print $kn.Suggestions.HaveOutliersNo}} {{- end}} {{- end}}Clinic 巡检工具主要针对系统前一段时间和目前的一些运行情况进行检查,根据收集的信息进行分析并指出系统的运行情况及存在隐患,同时给出适当的建议。从预防的角度看,着重于避免已知故障,同时对保持系统良好运行提出建议。
| 组件 | 数量 | 内存 (MB) | CPU (核) | 磁盘 (GB) | 网卡 (Mbps) |
|---|---|---|---|---|---|
| TiDB | {{.ClusterReport.GetTiDBNum}} | {{with index .ClusterReport.CInfos "TiDB"}}{{print .MemorySize}}{{- end}} | {{with index .ClusterReport.CInfos "TiDB"}}{{print .CpuCoresMin}}{{- end}} | {{with index .ClusterReport.CInfos "TiDB"}}{{print .StorageDeviceSize}}{{- end}} | {{with index .ClusterReport.CInfos "TiDB"}}{{print .NetworkSpeed}}{{- end}} |
| TiKV | {{.ClusterReport.GetTiKVNum}} | {{with index .ClusterReport.CInfos "TiKV"}}{{print .MemorySize}}{{- end}} | {{with index .ClusterReport.CInfos "TiKV"}}{{print .CpuCoresMin}}{{- end}} | {{with index .ClusterReport.CInfos "TiKV"}}{{print .StorageDeviceSize}}{{- end}} | {{with index .ClusterReport.CInfos "TiKV"}}{{print .NetworkSpeed}}{{- end}} |
| PD | {{.ClusterReport.GetPDNum}} | {{with index .ClusterReport.CInfos "PD"}}{{print .MemorySize}}{{- end}} | {{with index .ClusterReport.CInfos "PD"}}{{print .CpuCoresMin}}{{- end}} | {{with index .ClusterReport.CInfos "PD"}}{{print .StorageDeviceSize}}{{- end}} | {{with index .ClusterReport.CInfos "PD"}}{{print .NetworkSpeed}}{{- end}} |
| TiFlash | {{.ClusterReport.GetTiFlashNum}} | {{with index .ClusterReport.CInfos "TiFlash"}}{{print .MemorySize}}{{- end}} | {{with index .ClusterReport.CInfos "TiFlash"}}{{print .CpuCoresMin}}{{- end}} | {{with index .ClusterReport.CInfos "TiFlash"}}{{print .StorageDeviceSize}}{{- end}} | {{with index .ClusterReport.CInfos "TiFlash"}}{{print .NetworkSpeed}}{{- end}} |
| Monitor | {{.ClusterReport.GetMonitorNum}} | {{with index .ClusterReport.CInfos "Monitor"}}{{print .MemorySize}}{{- end}} | {{with index .ClusterReport.CInfos "Monitor"}}{{print .CpuCoresMin}}{{- end}} | {{with index .ClusterReport.CInfos "Monitor"}}{{print .StorageDeviceSize}}{{- end}} | {{with index .ClusterReport.CInfos "Monitor"}}{{print .NetworkSpeed}}{{- end}} |
| TiCDC | {{.ClusterReport.GetTiCDCNum}} | {{with index .ClusterReport.CInfos "TiCDC"}}{{print .MemorySize}}{{- end}} | {{with index .ClusterReport.CInfos "TiCDC"}}{{print .CpuCoresMin}}{{- end}} | {{with index .ClusterReport.CInfos "TiCDC"}}{{print .StorageDeviceSize}}{{- end}} | {{with index .ClusterReport.CInfos "TiCDC"}}{{print .NetworkSpeed}}{{- end}} |
| TiSpark | {{.ClusterReport.GetTiSparkNum}} | {{with index .ClusterReport.CInfos "TiSpark"}}{{print .MemorySize}}{{- end}} | {{with index .ClusterReport.CInfos "TiSpark"}}{{print .CpuCoresMin}}{{- end}} | {{with index .ClusterReport.CInfos "TiSpark"}}{{print .StorageDeviceSize}}{{- end}} | {{with index .ClusterReport.CInfos "TiSpark"}}{{print .NetworkSpeed}}{{- end}} |
warn: 发现 {{$com}} 与 {{$dupcom}} 混合部署情况,混合部署IP: {{range $index, $ip := $ips -}}{{$ip | printf "%s "}}{{- end}} ,建议分开部署,目前的部署模式增加 {{$com}} 的性能风险, 并有可能引发 OOM。
{{- end}} {{- end}} {{- end}} {{else}}未检查出混合部署情况
{{- end}}用户的 TiDB 集群运行的操作系统如下:
{{range $ip, $insight := .ClusterReport.OriData.InsightInfo -}}{{print $ip}} {{print $insight.SysInfo.OS}}
{{- end}}与集群相关的 OS 相关配置如下:
vm.swappiness: {{$swapset := .ClusterReport.GetSwappiness}} {{range $ip, $swap := $swapset -}}
ip: {{print $ip}}, swappiness: {{print $swap}}
{{- end}}ip: {{print $ip}}, tidb soft nproc: {{print $limit}}
{{- end}} {{$Type := "hard"}} {{$Item := "nproc"}} {{$valset := .ClusterReport.GetUlimit $Type $Item}} {{range $ip, $limit := $valset -}}ip: {{print $ip}}, tidb hard nproc: {{print $limit}}
{{- end}} {{$Type := "soft"}} {{$Item := "nofile"}} {{$valset := .ClusterReport.GetUlimit $Type $Item}} {{range $ip, $limit := $valset -}}ip: {{print $ip}}, tidb soft nofile: {{print $limit}}
{{- end}} {{$Type := "hard"}} {{$Item := "nofile"}} {{$valset := .ClusterReport.GetUlimit $Type $Item}} {{range $ip, $limit := $valset -}}ip: {{print $ip}}, tidb hard nofile: {{print $limit}}
{{- end}}ip: {{print $ip}} swap: {{print $insight.SysInfo.Memory.Swap}},建议关闭swap
{{else}}ip: {{print $ip}} swap: {{print $insight.SysInfo.Memory.Swap}} {{- end}} {{- end}}
当前集群版本为: {{.ClusterReport.OriData.ClusterMeta.Version}}。
Name: {{print $symtom.Name}}
Kibana: {{print $symtom.Kibana}}
{{if len $symtom.KB -}}KB: {{print $symtom.KB}}
{{- end}} {{if len $symtom.Jira -}}Jira: {{print $symtom.Jira}}
{{- end}}{{print .PriorKnowledge.Suggestions.HaveOutliersNo}}
{{- end}}SQL 处理的总 Duration 时长,99 线平均值为 {{printf "%.2f" .SysStatistics.SqlInfo.Mean99}} 秒,999 线平均值为 {{printf "%.2f" .SysStatistics.SqlInfo.Mean99Plus}} 秒, {{$kn := .PriorKnowledge}} {{$sys := .SysStatistics}} {{if (len .SysStatistics.SqlInfo.Outliers) -}} {{print $kn.Suggestions.HaveOutliersYes}} {{range $time, $value := .SysStatistics.SqlInfo.Outliers -}}
Time: {{ $time | $sys.TimestampParse | printf "%s" }}, Duration: {{ $value | printf "%.2f"}}s
{{- end}} {{else}} {{print $kn.Suggestions.HaveOutliersNo}} {{- end}}Name: {{print $symtom.Name}}
Kibana: {{print $symtom.Kibana}}
{{if len $symtom.KB -}}KB: {{print $symtom.KB}}
{{- end}} {{if len $symtom.Jira -}}Jira: {{print $symtom.Jira}}
{{- end}}{{print .PriorKnowledge.Suggestions.HaveOutliersNo}}
{{- end}}以上报告由 Clinic toolkit 自动生成,目前尚为测试版,未尽之处,强烈建议请人工复核。