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

✨ DevOps | Changing HealthCheck path for Web APIs #1169

Open
4 tasks
jernejk opened this issue Jan 23, 2025 · 1 comment
Open
4 tasks

✨ DevOps | Changing HealthCheck path for Web APIs #1169

jernejk opened this issue Jan 23, 2025 · 1 comment
Labels
feature New functionality.

Comments

@jernejk
Copy link
Member

jernejk commented Jan 23, 2025

Cc: @vladislav-kir @chrisschultzssw @RobJT-wq

Hi @adamcogan,

Pain

Currently, we are getting a lot of errors on Application Insights because it's doing a health check on / instead of /health. Updating the path will improve error reporting.

Suggested Solution

In az-deploy.yml run the script:

az webapp config set \
        --resource-group ${{ steps.bicep.outputs.resourceGroupName }} \
        --name ${{ steps.bicep.outputs.appServiceName }} \
        --health-check-path "/health"

Tasks

  • Update the script
  • Verify the health check no longer pings /

Acceptance Criteria

Screenshots

Image
Figure: We have consistent errors on / endpoint due health check ping from Azure.

Thanks!

@jernejk jernejk added the feature New functionality. label Jan 23, 2025
@chrisschultzssw
Copy link
Member

chrisschultzssw commented Jan 23, 2025

You should be able to do this within the app service bicep module:
https://github.com/SSWConsulting/SSW.Rewards.Mobile/blob/main/infra/modules/webapp.bicep

e.g.:

resource app 'Microsoft.Web/sites@2022-09-01' = {
  name: appServiceName
  location: location
  tags: tags
  identity: {
  properties: {
    siteConfig: {
      healthCheckPath: '/health'
    }
  }
}

As per: https://medium.com/@mariekie/bicep-enable-azure-health-checks-on-app-services-dbc057abed35

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

No branches or pull requests

2 participants