mirror of
https://github.com/swiss/fch-monitoring.git
synced 2026-08-26 12:34:21 +00:00
Read-only mirror of https://github.com/swiss/fch-monitoring — Bundeskanzlei. Issues & pull requests at the source.
- C# 100%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
* fix: exception details removed from published system status * chore: update THIRD_PARTY_LICENSES.md --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> |
||
| .github | ||
| src | ||
| .editorconfig | ||
| .gitignore | ||
| CHANGELOG.md | ||
| CONTRIBUTING.md | ||
| LICENSE | ||
| README.md | ||
| SECURITY.md | ||
| THIRD_PARTY_LICENSES.md | ||
Introduction
This library contains health checks that can be used to integrate with the OCC (operation control center) of the Federal Office of Information Technology, Systems and Telecommunication FOITT. Additionally, it offers automatic mapping to an HTTP endpoint where the current state of the health checks can be queried.
The latest NuGet package is published at https://www.nuget.org/packages/Swiss.FCh.Monitoring.
Usage
The health checks can be configured in your Program.cs.
using Swiss.FCh.Monitoring.Extensions;
[...]
var builder = WebApplication.CreateBuilder(args);
builder.Services
.AddHealthChecks()
.AddDatabase<YourDataContext>()
.AddUrl("my-health-name", "https://url-to-check.test");
[...]
var app = builder.Build();
app.MapFChHealthChecks(); //creates '/api/systemstatus' endpoint (route can be overriden)
Contribution
See: https://github.com/swiss/fch-monitoring/blob/main/CONTRIBUTING.md
Security
See: https://github.com/swiss/fch-monitoring/blob/main/SECURITY.md
Development Workflow
To publish a new version of the NuGet package, proceed as follows.
- apply and push your changes
- define and describe the new version in
CHANGELOG.md - push the corresponding label with
git tag vx.x.xandgit push origin v.x.x.x - go to GitHub -> Actions -> 'Build and Publish to NuGet.org' and trigger a run while specifying the correct GIT label