Pro Web UI

Mike Perham edited this page Dec 18, 2016 · 5 revisions

See the Monitoring page for basics on setting up Sidekiq's Web UI. To activate the Sidekiq Pro web features, you must require it in your config/routes.rb:

require 'sidekiq/pro/web'

Your::Application.routes.draw do
  mount Sidekiq::Web => '/sidekiq'
end

Filtering

Sidekiq's retry set is very handy to diagnose and fix bugs in your code but it can fill up with hundreds or thousands of jobs, making it difficult at times to find the jobs you want to focus on.

Sidekiq Pro allows you to filter the jobs in the Dead, Retry and Scheduled sets to see only the jobs you care about:

filtering

Type any substring that can be found in the job data: the worker class, a snippet of the arguments, etc.

Redis does not allow filtering on queues because they are implemented via lists, not a data structure that can be scanned. See Redis SCAN Notes.

Sharding

Sidekiq Pro can monitor multiple Sidekiq shards in a single web process. You must create a different connection pool for each shard and mount a different copy of the Web UI for each shard:

POOL1 = ConnectionPool.new { Redis.new(:url => "redis://localhost:6379/0") }
POOL2 = ConnectionPool.new { Redis.new(:url => "redis://localhost:6378/0") }

mount Sidekiq::Pro::Web => '/sidekiq' # default
mount Sidekiq::Pro::Web.with(redis_pool: POOL1), at: '/sidekiq1', as: 'sidekiq1' # shard1
mount Sidekiq::Pro::Web.with(redis_pool: POOL2), at: '/sidekiq2', as: 'sidekiq2' # shard2