Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

App Settings Required or Not is Unclear #74379

Closed
andrewholler opened this issue Apr 26, 2021 · 4 comments
Closed

App Settings Required or Not is Unclear #74379

andrewholler opened this issue Apr 26, 2021 · 4 comments

Comments

@andrewholler
Copy link

It is unclear whether the app settings are required for the app service health check feature to work or not. Will app service health checks work with just the "healthCheckPath" web config setting specified? Does WEBSITE_HEALTHCHECK_MAXPINGFAILURES need to be set for this feature to work or will it default if the app setting is not set?


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

@SnehaAgrawal-MSFT
Copy link
Contributor

@aholler2 Thanks for the feedback! We are currently investigating and will update you shortly.

@SnehaAgrawal-MSFT
Copy link
Contributor

@aholler2 Thanks for asking question! To elaborate If you simply want to enable Health check follow below steps:

  1. Browse to the Azure portal and select your App Service app.
  2. Under Monitoring, select Health check.
  3. Select Enable and provide a valid URL path on your application, such as /health or /api/health.
  4. by clicking save Health check feature is now enabled.

But additionally if you also want to configure the Health check options then you need to set app setting like WEBSITE_HEALTHCHECK_MAXPINGFAILURES ; WEBSITE_HEALTHCHECK_MAXUNHEALTHYWORKERPERCENT as described here

@andrewholler
Copy link
Author

andrewholler commented Apr 29, 2021

I am still unclear on whether or not the app settings are required. Does your reply mean WEBSITE_HEALTHCHECK_MAXPINGFAILURES is not required to be set then? Does it have a default value like WEBSITE_HEALTHCHECK_MAXUNHEALTHYWORKERPERCENT (default is 50)? We want to enable health check on app services by default and would prefer to not touch the app settings.

@RyanHill-MSFT
Copy link
Contributor

Hi @aholler2 the app setting is not required to enable health check.

$resourceGroupName = "resourcegroupname"
$appName = "webappname"
$webApp = Get-AzWebApp -ResourceGroupName $resourceGroupName -Name $appName -ErrorAction Stop

# enable healthcheck feature. Update healthcheckpath
$webApp.SiteConfig.healthCheckPath = "/healthcheckpath"

# Saving new configuration
$webApp = Set-AzWebApp -WebApp $webApp -ErrorAction Stop

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants