# magent **Repository Path**: acidrain/magent ## Basic Information - **Project Name**: magent - **Description**: No description available - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2017-12-20 - **Last Updated**: 2020-12-19 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README ## Monitor agent ### 获取操作日志 ```shell Get /api/magent/v1/oplogs 查询参数: 必须包含from参数,如果省略to,则to默认为当前时间。 from: 起始时间, 形如200601021504 to: 截止时间,形如200601021504 ``` 返回的数据形如: ```json [ { "_id": 2813, "type": "check report", "username": "admin", "created_at": "2016-11-21 11:50", "ip": "" }, { "_id": 2814, "type": "check report", "username": "admin", "created_at": "2016-11-21 11:56", "ip": "" } ] ``` ### 获取健康度 ```shell Get /api/magent/v1/health 查询参数: threshold: 阈值,为0-100之间的某个整数,是可选参数 ``` ```json [ { "month": "2016-12", "value": 100, "type": "windfarm", "name": "内蒙苏佑" }, { "month": "2016-12", "value": 100, "type": "windfarm", "name": "黑龙江双津河" }, { "month": "2016-12", "value": 100, "type": "district", "name": "内蒙古" }, { "month": "2016-12", "value": 100, "type": "district", "name": "黑龙江" }, { "month": "2016-12", "value": 100, "type": "china", "name": "china" } ] ```