doris监控
#cat autobe.sh
#!/bin/sh
if [ $(curl -s http://127.0.0.1:8160/api/health | grep “status” |grep -c “OK”) -eq 0 ];
then
sh /opt/doris/be/bin/start_be.sh --daemon
fi
#cat hangbe.sh
#!/bin/sh
if [ $(ps -ef | grep autobe.sh | grep -v “grep” | wc -l) -gt 1 ];
then
sh /opt/doris/be/bin/stop_be.sh --daemon
ps -ef | grep autobe.sh | awk ‘{print $2}’|xargs kill -9
fi
#crontab -l
-
-
-
-
- /opt/doris/be/bin/autobe.sh
-
-
-
-
-
-
-
- /opt/doris/be/bin/hangbe.sh
-
-
-