程序師世界是廣大編程愛好者互助、分享、學習的平台,程序師世界有你更精彩!
首頁
編程語言
C語言|JAVA編程
Python編程
網頁編程
ASP編程|PHP編程
JSP編程
數據庫知識
MYSQL數據庫|SqlServer數據庫
Oracle數據庫|DB2數據庫
您现在的位置: 程式師世界 >> 編程語言 >  >> 更多編程語言 >> Python

Python develops Linux system application (docker container) service HTTP monitoring timeout / fault restart tool

編輯:Python

Packed Linux The executable under :https://download.csdn.net/download/zxstrive/13191648

One 、Python catalogue

  • main.py python Main program or script , Cycle test ;
  • property.py For reading configuration files , And put it into the properties of the class ;
  • smtp.py It is used to send e-mail after the problem is detected and the command is executed or the problem is recovered ;
  • handle.py Use requests Configured in the request attribute url Normal access , If it cannot be accessed, the restart command will be executed according to the configuration ;
  • conf Properties profile .

Two 、 Introduction to attribute configuration file

[operations]
operate[0] = http://172.26.104.170:8380/rdsp-data-recv, docker restart rdsp-data-recv-8380, [email protected], timeout, 10
operate[1] = http://172.26.104.170:8381/rdsp-data-recv, docker restart rdsp-data-recv-8381, [email protected], timeout, 10
operate[2] =

  1. 上一篇文章:
  2. 下一篇文章:
Copyright © 程式師世界 All Rights Reserved