|
|
package com.monitor.other.dns.service.impl;
|
|
|
|
|
|
import com.monitor.other.dns.common.DNSConfig;
|
|
|
import com.monitor.other.dns.service.IDNSMonitorService;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
/**
|
...
|
...
|
@@ -9,15 +11,20 @@ import org.springframework.stereotype.Service; |
|
|
@Service("dnsMonitorService")
|
|
|
public class DNSMonitorServiceImpl implements IDNSMonitorService{
|
|
|
|
|
|
@Autowired
|
|
|
DNSConfig dnsConfig;
|
|
|
|
|
|
/**
|
|
|
* 监控DNS域名解析是否出现异常
|
|
|
*/
|
|
|
@Override
|
|
|
public void monitor() {
|
|
|
|
|
|
//TODO 从配置文件中获取需要遍历的组合 host + uid
|
|
|
|
|
|
System.out.println(dnsConfig.getUids().length + " " + dnsConfig.getUids()[0] + " " + dnsConfig.getUids()[1]);
|
|
|
System.out.println(dnsConfig.getHosts());
|
|
|
System.out.println(dnsConfig.getServices());
|
|
|
|
|
|
//TODO step1 判断host + uid 是否返回一组有效的ip地址
|
|
|
//TODO step2 判断通过dns解析后的ip地址调取服务 是否返回正常相应 200码
|
|
|
}
|
...
|
...
|
|