Skip to content

CritterWatch Server Library ​

This is the library you install in the CritterWatch console itself — the dedicated ASP.NET Core process that operators connect to.

Pick the package that matches your store. Each one references its store, does the full registration for you (including IntegrateWithWolverine()), and exposes the same AddCritterWatch(WebApplicationBuilder) / UseCritterWatch(WebApplication) pair with an identical signature — so switching stores is a package swap and nothing else:

PackageStoreNotes
CritterWatchMarten / PostgreSQLalso takes a pre-built NpgsqlDataSource overload, for Aspire
CritterWatch.SqlServerPolecat / SQL Server
CritterWatch.SqliteFisher / SQLiteneeds no database service — it writes a file

CritterWatch.Services is the store-agnostic core the three share. All three depend on it, so you never install it directly.

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(...), an extension on WebApplicationBuilder that registers the console's services.
  • UseCritterWatch(...) extension that maps the HTTP API, the SignalR hub, the health endpoints, 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:

cs
builder.AddCritterWatch(connectionString, opts =>
{
    opts.UseRabbitMq(rabbitUri).AutoProvision();
    opts.ListenToRabbitQueue("critterwatch").ProcessInParallelWithNativeAcks().UseCritterWatchSerializer();
});

var app = builder.Build();
app.UseCritterWatch();

For production hosting patterns (HTTPS, authentication, Aspire), see Hosting Guide; to run the console inside your own application instead, see Embedded CritterWatch. For configuration knobs, see Configuration Reference.

What gets persisted ​

The console persists its own bookkeeping in a dedicated critterwatch schema in its own database — Marten/PostgreSQL, Polecat/SQL Server, or Fisher/SQLite, depending on which flavour package you installed:

  • 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, and the channel the browser's operator commands travel on. See SignalR Integration.
  • Health endpoints at /health/live and /health/ready.
  • 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 AddCritterWatch and UseCritterWatch register and map.
  • HTTP API Reference — every HTTP endpoint mounted by the console.
  • Alert System — how the alert evaluator runs and what it persists.
  • SignalR Integration — what messages reach the browser, how commands travel back, and how to connect your own SignalR client.

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.