Note:
This topic has been translated from a Chinese forum by GPT and might contain errors.
Original topic: Prometheus的TSDB中的buckets是如何从TIDB获取的
As shown in the picture, I found a bucket monitoring Raft message wait latency while checking Grafana. I couldn’t find the source of the bucket tikv_raftstore_raft_msg_wait_time_duration_secs_bucket
through Google, source code, or documentation. Could you please explain how Prometheus obtains this metric? Is there a way to add some monitoring metrics by myself?
You can refer to this for adding it yourself.
This metric is taken from TiKV, you won’t find it in the TiDB source code 
You can check the prometheus.yml configuration file for the job_name: “tikv” section, where each TiKV node is configured as targets. Prometheus periodically pulls metric data from these targets and stores it in Prometheus. The corresponding TiKV interface is http://${tikv_ip}:${tikv_status_port}/metrics.
Thank you for your reply, bro.
Thank you for the explanation!
This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.