Closed tkalanick closed 5 years ago
TiDB and PD don't have CPU metrics by itself. The Overview dashboard gets these metrics from node-exporter. But node-exporter is not managed by tidb-operator. Usually only one node-exporter daemonset will be deployed in a Kubernetes and this is usually deployed globally by kubernetes system administrator.
If you want to see PD/TiDB CPU metrics, you can deploy monitor addons to your kubernetes. And all the pods cpu/memory usage can be viewed on Grafana.
I've just confirmed with TiDB team, they'll expose CPU metrics for TiDB in tidb-server itself.
See this issue for more detail: https://github.com/pingcap/tidb/issues/8539
TiDB now exposes its own CPU measurement through prometheus. In general I recommend running netdata to look at metrics that are not specific to TiDB.
only "tikv_thread_cpu_seconds_total" is exposed to grafana. please add cpu metrics for TiDB and TiPD