How do I reset my sidekiq counters?

Also, to reset specific days in the history panel, you can do:

Sidekiq.redis {|c| c.del('stat:processed:2015-07-02') }
Sidekiq.redis {|c| c.del('stat:failed:2015-07-02') }

And repeat for each day you want to clear.

This is useful if you had a wild job spawning and failing many times more than your usual and you get a history graph with a massive spike in it that makes all your usual history values effectively a flat line.


To reset processed jobs:

Sidekiq.redis {|c| c.del('stat:processed') }

and to reset failed jobs:

Sidekiq.redis {|c| c.del('stat:failed') }

To reset statistics:

Sidekiq::Stats.new.reset

ref: Add reset stats to Web UI summary box and method to API

Also, you can now clear specific stats:

  • single stat by Sidekiq::Stats.new.reset('failed')
  • or multiple stats by Sidekiq::Stats.new.reset('failed', 'processed')

(Thanks https://stackoverflow.com/users/2475008/tmr08c for update)