public async Task RunAsync() { foreach (var client in await _clientStore.GetAllAsync()) { try { _logger.LogInformation($"Ping instance: {client.Instance}, address: {client.HealthEndpoint}"); var response = await _httpClient.GetAsync(client.HealthEndpoint); var responseString = await response.Content.ReadAsStringAsync(); var observableHealth = responseString.Deserialize <ObservableHealth>(); _logger.LogInformation($"Response from {client.Instance}: {observableHealth.Status}"); } catch (System.Exception) { _logger.LogWarning($"Not Found instance: {client.Instance}"); } } }