airflow worker监控脚本

 #!/bin/bash
   count=`ps aux| egrep 'serve_logs|celeryd'|grep -v "grep" | wc -l`
   echo ${count}
  if [ ${count} -eq 0 ]
   then
       rm -rf /home/airflow/airflow-worker.pid
       su  airflow -c " airflow worker -D  >/dev/null 2>&1 &";           
   else                       
       date                            
      echo "airflow-worker is running..." >>/home/airflow/mon.log

 

 

 

群号584912368

你可能感兴趣的:(经验)