Skip to content

Dashboard ​

GrydJobs includes an embedded monitoring dashboard powered by Hangfire Dashboard.

Setup ​

csharp
var app = builder.Build();

app.UseGrydJobs();
app.UseGrydJobsDashboard(); // Default path: /grydjobs/dashboard

Custom Path ​

csharp
app.UseGrydJobsDashboard(pathMatch: "/admin/jobs");

Authentication ​

The dashboard shows and acts on every tenant's jobs, so it is the platform's: GrydJobsDashboardAuthFilter admits an authenticated session that holds the platform permission read:jobs (Platform Operator, Platform Support), read through ISessionGrants. Authentication alone is not enough.

Read-only ​

The dashboard is a window, not a console: UseGrydJobsDashboard sets IsReadOnlyFunc to always true, so a session with read:jobs sees queues, jobs and servers but cannot retry, delete, requeue or trigger from the UI (Hangfire gives those actions no separate permission and records no actor). Operate through the GrydJobs.API routes, which require manage:jobs. A custom filter in the example below changes who may open the dashboard, not this.

Custom Authorization ​

To implement more granular authorization (e.g., require admin role), create a custom filter:

csharp
using Hangfire.Dashboard;

public class AdminOnlyDashboardFilter : IDashboardAuthorizationFilter
{
    public bool Authorize(DashboardContext context)
    {
        var httpContext = context.GetHttpContext();
        return httpContext.User.IsInRole("Admin");
    }
}

Then configure it:

csharp
// Override the default dashboard setup
app.UseHangfireDashboard("/grydjobs/dashboard", new DashboardOptions
{
    Authorization = [new AdminOnlyDashboardFilter()],
    DashboardTitle = "GrydJobs Dashboard"
});

Features ​

The dashboard provides:

  • Real-time monitoring — Live view of job processing stats
  • Queue management — View queue depths and throughput
  • Job inspection — View job details, parameters, and exception info
  • Recurring jobs — List of registered cron jobs with next/last execution
  • Failed jobs — Inspect failed jobs (retry through the API routes; the dashboard is read-only)
  • Server list — View active Hangfire servers and their heartbeats
  • Automatic refresh — Stats polling every 5 seconds

Released under the MIT License.