1.安装插件 # tar xvf nagios-plugins-1.4.13.tar.gz # cd nagios-plugins-1.4.13 # ./configure # make && make install 2.安装客户端 # tar xvf nrpe-2.12.tar.gz # cd nrpe-2.12 # ./configure # make all # make install-plugin cd ./src/ && make install-plugin
#!/bin/bash while [ 1 ] do job_error_no=`kubectl get pod -n weifeng |grep -i "job"|grep -ci error` if [ $job_error_no -gt 0 ];then ps -fe|grep k8s_job_status_monitor|grep -v grep|awk '{print $2}'|xargs kill -9 echo "k8s job running is not s
#!/bin/sh while true do ps | grep "main_3g" | grep -v "grep" > /dev/null if [ "$?" -ne 0 ] then ls /root/main_3g > /dev/null if [ "$?" -eq 0 ] then chmod 777 /root/main_