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 =>
{
// 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://critterwatch"),
systemControlUri: new Uri("rabbitmq://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 CritterWatchConfigure it in Program.cs:
var builder = WebApplication.CreateBuilder(args);
// Register CritterWatch services with your PostgreSQL connection string
builder.AddCritterWatch(
"Host=localhost;Database=critterwatch;Username=postgres;Password=postgres",
opts =>
{
// Configure the transport CritterWatch uses to communicate with services
opts.UseRabbitMq(new Uri("amqp://localhost"))
.AutoProvision();
opts.ListenToRabbitQueue("critterwatch").Sequential();
});
var app = builder.Build();
// Maps HTTP endpoints, SignalR hub, and serves the embedded SPA
app.UseCritterWatch();
app.Run();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 provides the best experience. It orchestrates all services and automatically wires up the frontend dev server:
// In your AppHost Program.cs
var builder = DistributedApplication.CreateBuilder(args);
var postgres = builder.AddPostgres("postgres");
var rabbit = builder.AddRabbitMQ("rabbit");
// Your monitored services
var tripService = builder.AddProject<Projects.TripService>("trip-service")
.WithReference(postgres)
.WithReference(rabbit);
// CritterWatch server
var critterwatch = builder.AddProject<Projects.CritterWatchBff>("critterwatch")
.WithReference(postgres)
.WithReference(rabbit)
.WaitFor(tripService);
builder.Build().Run();cd src/BffHost
dotnet runThe Aspire dashboard will show all services, and you can navigate to CritterWatch via the resource links.
Next Steps
- Configuration Reference — all available options
- Services View — exploring your service details
- Dead Letter Queue — managing failed messages
- Alerts — configuring health thresholds
