CritterWatch Server Library
CritterWatch.Services (NuGet: CritterWatch) is the package you install in the CritterWatch console itself — the dedicated ASP.NET Core process that operators connect to.
You only need this if you're standing up a console host. If you're integrating monitoring into a service you're trying to observe, you want Wolverine.CritterWatch instead.
What it gives you
AddCritterWatch(...)extension that registers the console's services into yourIHostApplicationBuilder.UseCritterWatch(...)extension that maps the HTTP API, the SignalR hub, and the embedded Vue SPA.- The full backend that handles incoming telemetry, evaluates alerts, persists history, and serves the browser UI.
The minimum host setup is three lines:
builder.AddCritterWatch(connectionString, opts => {
opts.UseRabbitMq(rabbitUri).AutoProvision();
opts.ListenToRabbitQueue("critterwatch").Sequential();
});
var app = builder.Build();
app.UseCritterWatch();For production hosting patterns (HTTPS, authentication, embedding into an existing app, Aspire), see Hosting Guide. For configuration knobs, see Configuration Reference.
What gets persisted
The console uses Marten on a dedicated PostgreSQL schema (critterwatch) to persist its own bookkeeping:
- Live service state, reconstructed from incoming telemetry.
- Alert lifecycle history.
- The activity timeline.
- The audit log of operator actions.
- A rolling history of metrics buckets per service / message type.
It never opens connections to your monitored services' databases. Service state is reported to the console by the services themselves.
What gets exposed
UseCritterWatch() mounts:
- HTTP API at
/api/critterwatch/*— see HTTP API Reference. - SignalR hub at
/api/messages(configurable) — push channel for live updates. - Static files for the embedded Vue SPA, with client-side routing fallback.
Authentication is not included — add ASP.NET Core authentication middleware in front of UseCritterWatch() for any production deployment. See Hosting Guide → Authentication.
Pages in this section
- Hosting Extensions — what
AddCritterWatchandUseCritterWatchregister and map. - HTTP API Reference — every endpoint mounted by the console.
- Alert System — how the alert evaluator runs and what it persists.
- SignalR Integration — what messages reach the browser and how to embed your own SignalR client if you want to subscribe.
When you'd subclass / extend this
This is rare. The library is built to be configured (thresholds, channels, retention, transports) rather than extended. If you find yourself needing to subclass CritterWatch.Services types, open an issue — that's usually a signal that the configuration surface is missing something.
