Quick Start
This guide walks through connecting a Wolverine service to CritterWatch and opening the monitoring console for the first time.
Step 1: Start Infrastructure
Create or update your docker-compose.yml:
services:
postgres:
image: postgres:16
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: critterwatch
ports:
- "5432:5432"
rabbitmq:
image: rabbitmq:3-management
ports:
- "5672:5672"
- "15672:15672"docker compose up -dStep 2: Add Monitoring to Your Service
In each Wolverine service you want to monitor, install the package:
dotnet add package Wolverine.CritterWatchThen call AddCritterWatchMonitoring() inside your UseWolverine() configuration:
var builder = WebApplication.CreateBuilder(args);
builder.Host.UseWolverine(opts =>
{
// Required by CritterWatch's Pause and Restart actions, which are
// leader-owned agent assignment changes. Under Solo there is no leader,
// so those commands silently no-op. A single Balanced node elects itself
// leader and runs every agent locally, so this costs nothing single-node.
opts.Durability.Mode = DurabilityMode.Balanced;
// Configure the transport your service already uses
opts.UseRabbitMq(new Uri("amqp://localhost"))
.AutoProvision();
// Send telemetry to the CritterWatch server queue
// and listen for incoming commands on the service control URI
opts.AddCritterWatchMonitoring(
critterWatchUri: new Uri("rabbitmq://queue/critterwatch"),
systemControlUri: new Uri("rabbitmq://queue/trip-service-control")
);
});
var app = builder.Build();
app.Run();TIP
The AddCritterWatchMonitoring() call must come after your transport configuration (e.g., UseRabbitMq) so the observer can use the transport to publish telemetry.
Step 3: Create the CritterWatch Server
Create a new ASP.NET Core project for the CritterWatch console:
dotnet new web -n MyCritterWatch
cd MyCritterWatch
dotnet add package CritterWatchThis quick start uses the PostgreSQL flavour
CritterWatch is the Marten/PostgreSQL console. Two sibling packages give you the same console on a different store — CritterWatch.SqlServer (Polecat/SQL Server) and CritterWatch.Sqlite (Fisher/SQLite, no database server needed). The bootstrap below is identical for all three; only the package and the connection string change. See Installation.
Configure it in Program.cs:
var builder = WebApplication.CreateBuilder(args);
// Register CritterWatch services with your PostgreSQL connection string.
// The optional second parameter lets you add Wolverine transport configuration
// (e.g. RabbitMQ listeners) so CritterWatch can communicate with your services.
builder.AddCritterWatch(
"Host=localhost;Database=critterwatch;Username=postgres;Password=postgres",
opts =>
{
// Configure the same transport your monitored services use
opts.UseRabbitMq(new Uri("amqp://localhost"))
.AutoProvision();
opts.ListenToRabbitQueue("critterwatch").ProcessInParallelWithNativeAcks().UseCritterWatchSerializer();
});
// Single-node is the default — no clustering config needed. For a multi-node
// cluster, supply configureClusterShardedTopology (see Deployment › Clustering).
var app = builder.Build();
// Maps HTTP endpoints, the SignalR hub, and serves the embedded SPA
app.UseCritterWatch();
app.Run();Single node vs. cluster
This works as-is for a single CritterWatch node — clustering is off by default and is opt-in, so a single node needs no extra configuration at all. Running 2+ BFF nodes behind a load balancer? See Clustering: you'll set a matching partition count N on the BFF and on every monitored service.
Only one application to watch?
Since 1.1 you can skip the separate console project and embed the console in the application itself: opts.AddCritterWatchEmbedded(...) inside UseWolverine() and app.UseCritterWatchEmbedded(), with the UI at /critterwatch. On SQLite that needs no broker and no database server.
Step 4: Run Everything
Start your monitored service(s) and the CritterWatch server:
# Terminal 1: your service
cd MyService
dotnet run
# Terminal 2: CritterWatch
cd MyCritterWatch
dotnet runStep 5: Open the Console
Navigate to http://localhost:5000 (or whatever port your CritterWatch server runs on). You should see:
- The CritterWatch dashboard with your service listed
- Live health indicators updating in real time
- Node, agent, and endpoint status
Within a few seconds of starting your monitored service, it will appear in the Services view with its name, version, and current health status.
Using .NET Aspire (Recommended)
For development, .NET Aspire runs your services and the console together. Add the CritterWatch.Aspire package to your AppHost and add the console project you created in Step 3:
dotnet add package CritterWatch.AspireFirst published after 1.1.0-rc.3
CritterWatch.Aspire is published from the release after 1.1.0-rc.3. It was built as Aspire.Hosting.CritterWatch, but Aspire.Hosting.* is a reserved package-id prefix on nuget.org, so it was renamed before its first publish. Its API is unchanged, and its extension methods stay in the Aspire.Hosting namespace, like every other Aspire integration.
var builder = DistributedApplication.CreateBuilder(args);
var postgres = builder.AddPostgres("postgres");
// Not "critterwatch": Aspire resource names are unique across types, and the console owns that one.
var critterStore = postgres.AddDatabase("critterstore", "critterwatch");
var rabbit = builder.AddRabbitMQ("rabbitmq");
// Your console project: the ASP.NET Core app that calls builder.AddCritterWatch(...) and app.UseCritterWatch().
var console = builder.AddCritterWatch<Projects.MyCritterWatchConsole>()
// connectionName makes it ConnectionStrings:critterwatch, which is what the console reads
.WithReference(critterStore, connectionName: "critterwatch").WaitFor(critterStore)
.WithReference(rabbit).WaitFor(rabbit)
.WithJasperFxLicense();
// A monitored service waits for a healthy console and receives the console's license.
builder.AddProject<Projects.TripService>("trip-service")
.WithReference(postgres).WaitFor(postgres)
.WithReference(rabbit).WaitFor(rabbit)
.WithCritterWatch(console);
builder.Build().Run();# From your AppHost project
dotnet runUnder Aspire, read the connection strings Aspire injects instead of the localhost ones in Step 3: builder.Configuration.GetConnectionString("critterwatch") for the console's database and GetConnectionString("rabbitmq") for the broker, as the standalone host does. Your services do the same for their own postgres and rabbitmq references.
The Aspire dashboard shows every resource, and the console's Open console link takes you to CritterWatch. WithCritterWatch(console) makes each service wait until the console is healthy and gives it the console's license, which the licensed operator commands need on the service itself. See Hosting for what each call does.
Next Steps
- Sample Applications — complete, F5-able sample solutions monitoring real fleets across every transport
- Configuration Reference — all available options
- Services View — exploring your service details
- Dead Letter Queue — managing failed messages
- Alerts — configuring health thresholds
- Connect your AI — point Claude or any MCP agent at the console to query and operate your services
- Transport Options — broker-less alternatives if you don't want to run RabbitMQ / SQS / Azure Service Bus (HTTP and gRPC transports for CritterWatch ↔ monitored services).
