Dolphin Scheduler使用一段时间后,系统会产生大量log,而系统并没有一个功能去清理,因此需要自己定义。

1.- 清理日志文件,这个日志文件随时间推移非常占空间,可通过自定义脚本,然后通过crontab定时任务删除,具体如下:

find /root/dolphinscheduler-3.2/master-server/logs/ -type f -mtime +30 -delete -print

find /root/dolphinscheduler-3.2/master-server/logs/ -type d -empty -delete -print

find /root/dolphinscheduler-3.2/api-server/logs/ -type f -mtime +30 -delete -print

find /root/dolphinscheduler-3.2/api-server/logs/ -type d -empty -delete -print

find /root/dolphinscheduler-3.2/worker-server/logs/ -type f -mtime +30 -delete -print

find /root/dolphinscheduler-3.2/worker-server/logs/ -type d -empty -delete -print

find /root/tmp/zookeeper/version-2/ -type f -mtime +30 -delete -print

2.- 清理DB里的instance运行记录,这个保存在数据库里,可以通过app连接到DB里来删除

Dolphin Scheduler清理Log 和 Instance记录_log

DB名是:dolphinscheduler,默认用户名密码是:dolphinscheduler

主要存在2个表里

Dolphin Scheduler清理Log 和 Instance记录_dolphinscheduler_02

Dolphin Scheduler清理Log 和 Instance记录_dolphinscheduler_03

删除命令:

Dolphin Scheduler清理Log 和 Instance记录_清理_04