Search code examples
sidekiq

What is the Redis key for a queue in Sidekiq?


I would like to use Datadog to monitor the queue length of some background jobs.

Basically I need to know the name of the key that represents a queue in Sidekiq, so that I can monitor it as described here: https://docs.datadoghq.com/integrations/redisdb/

I've read that the Sidekiq keys have the form sidekiq:queue:myqueuename.

However I have tried to execute KEYS *myqueuename* and I can't find anything. I have also tried to search KEYS *sidekiq* but I don't get anything. If I search KEYS *queue* I get the key queues which represents a set with the names of the queues (e.g. deliveries, default, low). However those are only the names: I need the actual queues. What is the key of a queue?


Solution

  • queue:default
    

    is the name of the default queue. As you state, it is "queue:$NAME" but namespaces (if you use them (please don't)) will also prefix the key.