HOW TO ADD A SIMPLE HEALTH CHECK TO A .NET CORE API

preview_player
Показать описание
Health checks are usually used with an external monitoring service or container orchestrator to check the status of an app.

OUTLINE

ADD CONFIGURATION

00:08 - Go to method ConfigureServices()
00:11 - Add services.AddHealthChecks()
00:23 - Go to method Configure()
00:27 - Add endpoints.MapHealthChecks("/health");

TEST THE SERVICE

00:45 - Run the service
00:58 - Type /health in your path
01:01 - Your endpoint is healthy with http 200 status :)

#healthcheck #api #netcore #microservice

Рекомендации по теме
Комментарии
Автор

Thank you very much! This is so simple and concisely conveyed 👍

CttageChees