有没有办法通过API的方式去开启dashboard的持续分析功能

【 TiDB 使用环境】生产环境
【 TiDB 版本】V6.5.1
有没有方法通过api的方式去定时开启或关闭dashboard的持续分析功能?

1 个赞

开启
curl ‘http://127.0.0.1:2379/dashboard/api/continuous_profiling/config
-H ‘Authorization: xxx{token}’
–data ‘{“continuous_profiling”:{“enable”:true,“data_retention_seconds”:259200}}’

关闭
curl ‘http://127.0.0.1:2379/dashboard/api/continuous_profiling/config
-H ‘Authorization: Bearer xxx{token}’
–data ‘{“continuous_profiling”:{“enable”:false,“data_retention_seconds”:259200}}’

4 个赞

这个应该是可以的