he-sb / tech

My blog related to technique.
MIT License
9 stars 2 forks source link

ServerStatus探针配置 #3

Closed he-sb closed 4 years ago

he-sb commented 4 years ago

项目地址:https://github.com/cppla/ServerStatus

服务端配置:

docker run -d --restart=always --name=serverstatus -v /root/ServerStatus.json:/ServerStatus/server/config.json -p 999:80 -p 35601:35601 cppla/serverstatus

客户端配置:

wget --no-check-certificate -qO client-linux.py 'https://raw.githubusercontent.com/cppla/ServerStatus/master/clients/client-linux.py' && nohup python client-linux.py SERVER="server_ip" USER="s01" PASSWORD="PASSWORD" >/dev/null 2>&1 &
he-sb commented 4 years ago

客户端脚本执行完毕后返回的值即为 PID

he-sb commented 4 years ago

客户端 python 脚本的进程守护待添加

本部分作为例子放在 #15 中