DEV Community


Sidekiq Stats in Rails

jahboo profile image Alexander Budchanov Originally published at Updated on ・1 min read

If you use Sidekiq in your Rails project, you can watch tasks statistics through the web interface. Usually, you can find it here:**/sidekiq** (but in your project path may be different).
If you don't have access there, you can get the same data in Rails console.

To get statistics (number of tasks) by each queue:
=> {"local_cache"=>0, "default"=>0, "ts_delta"=>0, "mailchimp"=>0, "recorder"=>0}

Global statistics are available this way:!
=> {:processed=>61390,

The same stats are available separately:

stats =
stats.processed # number of processed tasks
stats.failed # number of failed tasks
stats.enqueued # number of enqueued tasks

and etc.

Also Sidekiq::Stats allows to look historical data. You can specify period. Something like:

s =, Date.parse('2019-02-05'))
  • first argument: number of days,
  • second argument: date until which return stats (default value is today and can be omitted)
=> {"2019-02-05"=>0, "2019-02-04"=>0}
=> {"2019-02-05"=>0, "2019-02-04"=>0}

Discussion (0)

Editor guide