public static HealthMonitoringService Create(IDnsServer dnsServer) { if (_healthMonitoringService is null) { _healthMonitoringService = new HealthMonitoringService(dnsServer); } return(_healthMonitoringService); }
public EmailAlert(HealthMonitoringService service, dynamic jsonEmailAlert) { _service = service; _smtpClient = new SmtpClientEx(); _smtpClient.DnsClient = new DnsClientInternal(_service.DnsServer); Reload(jsonEmailAlert); }
public AddressMonitoring(HealthMonitoringService service, IPAddress address, string healthCheck) { _service = service; _address = address; if (_service.HealthChecks.TryGetValue(healthCheck, out HealthCheck existingHealthCheck)) { _healthMonitors.TryAdd(healthCheck, new HealthMonitor(_service.DnsServer, _address, existingHealthCheck)); } }
public Task InitializeAsync(IDnsServer dnsServer, string config) { if (_healthMonitor is null) { _healthMonitor = HealthMonitoringService.Create(dnsServer); } //let Address class initialize config return(Task.CompletedTask); }
public Task InitializeAsync(IDnsServer dnsServer, string config) { if (_healthMonitor is null) { _healthMonitor = HealthMonitoringService.Create(dnsServer); } _healthMonitor.Initialize(JsonConvert.DeserializeObject(config)); return(Task.CompletedTask); }
public DomainMonitoring(HealthMonitoringService service, string domain, DnsResourceRecordType type, string healthCheck) { _service = service; _domain = domain; _type = type; if (_service.HealthChecks.TryGetValue(healthCheck, out HealthCheck existingHealthCheck)) { _healthMonitors.TryAdd(healthCheck, new HealthMonitor(_service.DnsServer, domain, type, existingHealthCheck)); } }
public WebHook(HealthMonitoringService service, dynamic jsonWebHook) { _service = service; Reload(jsonWebHook); }
public HealthCheck(HealthMonitoringService service, dynamic jsonHealthCheck) { _service = service; Reload(jsonHealthCheck); }