Authored by qinchao

跳过node检测

... ... @@ -22,6 +22,9 @@ import java.util.concurrent.ConcurrentHashMap;
* Created by zhengyouwei on 2017/2/28.
* <p>
* 监控node节点
*
* 9615 端口是个node项目,检测cpu,内存等信息,
* 需要在host主机上部署
*/
@Component
public class NodePm2Task {
... ... @@ -40,9 +43,6 @@ public class NodePm2Task {
@Scheduled(cron = "${cron_task_node_mem}")
public void nodePm2Info() {
logger.info("cron_task_node_mem start");
try {
String projects = httpRestClientService.doGet(URL + "getProjects", null);
logger.info("cron_task_node_mem projects "+projects);
... ... @@ -63,12 +63,12 @@ public class NodePm2Task {
List<PythonEnv> pythonEnvs = pythonProject.getEnvs();
for (PythonEnv pythonEnv : pythonEnvs) {
for (String ip : pythonEnv.getHost_ips()) {
if (ipSet.contains(ip) || !(ip.startsWith("10") || ip.startsWith("172"))) {
if (ipSet.contains(ip)||ip.equals("10.66.50.140") || !(ip.startsWith("10") || ip.startsWith("172"))) {
continue;
}
ipSet.add(ip);
logger.info("cron_task_node_mem for ip {} ,name {} ",ip,pythonEnv.getName());
//logger.info("cron_task_node_mem for ip {} ,name {} ",ip,pythonEnv.getName());
String result = httpRestClientService.doGet("http://" + ip + ":9615", null);
if(result==null){
... ...