# TiDB Database Monitoring System Data Flow

__*TiDB monitors data flow*__

![left](./student-guide/diagram/MonitorDataFlow_en_001_20220621.png)
-------------------------------------------------------------
Here we explain the monitoring data flow of Prometheus+ Grafana. Please refer to the picture,

In the first step, the Prometheus Server component of Prometheus pulls the data that needs to be monitored from the monitored TiDB instance, TiKV instance, and PD instance, and stored in the Prometheus Server component's timing database.

In the second step, the Grafana display system is responsible for querying the timing data stored in the Prometheus Server at a certain interval of time and displaying the results.

Step 3. When the time series data exceeds certain threshold values, the Alert Manager module will be triggered to process the alarm. The alarm processing can be implement via email, SMS, or live chat tool interface.