I currently have the below implementation for my HealthCheck:
This is my appsettings.json:
"HealthCheckUrls": {
"TestUrl": "http://test.com",
"TestUrl2": "http://test2.com"
}
In my ConfigureService method, I have the below:
services.AddHealthChecks()
.AddUrlGroup("get url from config here","urlname"); // Need to get url from config here
Is it possible to read the urls from the config file? I tried the below but does not work.
services.AddHealthChecks()
.AddUrlGroup(Configuration.GetSection("HealthCheckUrls:TestUrl"),"urlname");