一、进程服务检测自动拉取
运用知识点
. /etc/bashrc 加载用户的环境变量
打点到falcon 里面
执行的日志输出
脚本内容
#!/bin/bash . /etc/bashrc region=shdl host=`hostname` end_timestamp=`date +%s` status_num=`yarn application --list|grep AppPre|wc -l` status=`yarn application --list|grep Pre|awk '{print $6}'` stream_lock=`cat /home/eos/monitor/stream_lock.log` if [ $status_num = '1' ] ;then > /home/eos/monitor/stream_lock.log if [ $status = 'RUNNING' ] ;then echo -e "