Monitoring Issues

Note:
This topic has been translated from a Chinese forum by GPT and might contain errors.

Original topic: 监控问题

| username: TiDBer_5Clw0Vs7

[TiDB Usage Environment] Testing
[TiDB Version] 7.1.0
[Reproduction Path] TiDB deployed using docker-compose
[Encountered Issue: Phenomenon and Impact] Monitoring display is unavailable, alerts are unavailable, and TiKV’s leader and region are not monitored in Grafana
[Resource Configuration]


[Attachments: Screenshots/Logs/Monitoring]

| username: Miracle | Original post link

Take out the expressions for leader and region, and first check the raw metrics in Grafana’s explore to see if there is any data. If there is data, then look at the specific content of the expressions.

| username: TiDBer_5Clw0Vs7 | Original post link

I am a beginner and don’t quite understand how to operate it, but I am using the web version of Grafana. I couldn’t find the explore feature on the left side.

| username: Miracle | Original post link

It might be a different version. My Grafana version is V9.0.9. Check if you have the following explore option:

| username: TiDBer_5Clw0Vs7 | Original post link

My version is probably too low; I’m using 6.0.1 and couldn’t find explore.

| username: WalterWj | Original post link

It seems like this hasn’t been maintained for a long time. Use tiup to install TiDB. It can be installed on a single physical machine, just with each single instance.

| username: 小于同学 | Original post link

My page doesn’t have this.

| username: TiDBer_5Clw0Vs7 | Original post link

Using tiup should be fine, but my project requires using Docker :sweat_smile:

| username: TiDBer_5Clw0Vs7 | Original post link

Are you referring to Grafana or the Dashboard?

| username: WalterWj | Original post link

I understand your needs. Please note that TiDB has native support, but your operational costs and solutions to problems you encounter will be scarce online.

You might consider using k8s and the tidb-operator.

| username: TiDBer_5Clw0Vs7 | Original post link

Okay, got it, thank you.

| username: TiDBer_5Clw0Vs7 | Original post link

Sorry, I would like to ask again, did you encounter any parameters that can improve TiDB’s performance during your testing? I followed the official documentation for performance tuning, but there was basically no change in performance. I am using sysbench’s oltp_read_write.lua to test performance.

| username: WalterWj | Original post link

To optimize, you first need to identify where the bottleneck is. Check if the CPU of the stress testing machine is fully utilized and if the load CPU is sufficient. Determine whether the CPU usage of each TiDB component has exceeded 80%. Check if the IO is high and if the network is fully utilized. Find the bottleneck and then optimize.

| username: TiDBer_5Clw0Vs7 | Original post link

Got it, thanks for the explanation.

| username: redgame | Original post link

You can check if there is data for the original metrics on the Explore page in Grafana. If there is data displayed, you can then review the specific content of the expression for further analysis.

| username: TiDBer_aaO4sU46 | Original post link

I haven’t found this either…

| username: TiDBer_5Clw0Vs7 | Original post link

What version of Grafana are you using?

| username: TiDBer_5cwU0ltE | Original post link

Maybe you can try restarting the monitoring component or wait for a while to see. Sometimes there is indeed a delay.

| username: TiDBer_5Clw0Vs7 | Original post link

I have restarted it, but no data is being displayed. It might be an issue with my configuration.