weiyhcarlos / trainning Goto Github PK
View Code? Open in Web Editor NEWThis project forked from neilhong/trainning
This project forked from neilhong/trainning
if "ttl" in varDict.keys()
while(True)
def set_handler(self, params_dict): 参数表可以写成(self, config, method),调用时set_handler(**params_dict),保持接口可读性
try catch中不要包含不必要的逻辑,例如:
try:
data[module]["time"] = data["time"]
data[module]["machine_id"] = data["mac"]
self.database[module].insert_one(data[module])
except PyMongoError:
self.store_local(module, data[module])
error_info += ("upload " + module + " info fail.\n")
注意以下问题:
未考虑agent如何部署,也未说明依赖?以后系统应考虑快速部署方式,必要时需要提供部署文档。
subprocess滥用,python有自己的ntp库,不需要依赖ntpdate。
尽量不要上传二进制文件,尤其是在code目录。
直接装自带的deb包并使用ntpdate校准系统时间,可能引发一系列问题,例如:
* 兼容性
* 被监控机有自己需要同步的ntp服务器,并且业务服务强依赖该ntp,监控agent应该尽量避免修改任何系统环境
GET /monitor/api/machines
GET /monitor/api/machines/:id
只应该是同一类资源取集合或取特定一个资源的区别,实现时变成了取基本信息集合和取一台机器的基本信息加监控数据,接口的二义性会增加理解成本,不符合规范,请注意
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.