https://github.com/arnab-developer/apihealthcheck
Api health check app.
https://github.com/arnab-developer/apihealthcheck
application-insights azure background-task docker dotnet health-check
Last synced: 3 months ago
JSON representation
Api health check app.
- Host: GitHub
- URL: https://github.com/arnab-developer/apihealthcheck
- Owner: Arnab-Developer
- License: mit
- Created: 2021-01-11T17:42:19.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2022-08-24T03:07:45.000Z (almost 3 years ago)
- Last Synced: 2025-01-17T02:24:20.891Z (5 months ago)
- Topics: application-insights, azure, background-task, docker, dotnet, health-check
- Language: C#
- Homepage:
- Size: 137 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# API health check
[](https://github.com/Arnab-Developer/ApiHealthCheck/actions/workflows/ci-cd.yml)
This is a background task application with .NET (with DI, logging, configuration) to check API health. A small utility
app to check API health in a perticular time interval. Add the details of the APIs in configuration (like appsettings)
to check their health status. It uses an Azure Application Insights to log API health status.You need Visual Studio 2022 and ASP.NET 6 to work on this project locally.
## Run the app as is
This app uses some example APIs for health check. If you want to run the app as is then follow the below steps.
- Create an Azure Application Insights resource.
- Update the appsettings.json with the reference of the Application Insights.
```
"ApplicationInsights": {
"Key": "",
"LogLevel": {
"Default": "Information",
"Microsoft": "Error"
}
```
- Build the app and create docker image.
- Store the docker image in any container registry.
- Create a Azure Container Instence with the docker image from that container registry.You can find the health check logs in Application Insights.
## Test your own APIs
If you want to test different APIs then follow the below steps.
- Update the appsettings.json with API details to check their health.
```
"ApiDetails": [
{
"Name": "Microsoft",
"Url": "https://microsoft.com",
"Credential": {
"UserName": "",
"Password": ""
},
"IsEnable": true
}
]
```
- Create an Azure Application Insights resource.
- Update the appsettings.json with the reference of the Application Insights.
```
"ApplicationInsights": {
"Key": "",
"LogLevel": {
"Default": "Information",
"Microsoft": "Error"
}
```
- Build the app and create docker image.
- Store the docker image in any container registry.
- Create a Azure Container Instence with the docker image from that container registry.You can find the health check logs in Application Insights.
## Docker image
This app is in a docker image and stored in dockerhub.
https://hub.docker.com/r/45862391/apihealthcheck