Skip to content

Latest commit

 

History

History
62 lines (45 loc) · 2.2 KB

README.md

File metadata and controls

62 lines (45 loc) · 2.2 KB

Official Docker image

This is an official Docker image for sidekiq-prometheus-exporter gem.

It combines some approaches which were already published as images by other devs and at the same time brings more flexibility for the stock configuration and applies recommended Docker best practices.

⚠️ The Docker image currently supports only standard metrics.

Supported ENVs

Required

  • REDIS_URL - RFC 3986 generic URI, exclusive with REDIS_HOST
  • REDIS_HOST - a Redis host, exclusive with REDIS_URL (default: localhost)

Optional

  • REDIS_SSL - a flag to enable Redis SSL URL scheme (default: false)
  • REDIS_PORT - a Redis port (default: 6379)
  • REDIS_USERNAME - a Redis username (if you need one)
  • REDIS_PASSWORD - a Redis password (if you have it)
  • REDIS_DB_NUMBER - a Redis database number (default: 0)
  • REDIS_NAMESPACE - a Redis namespace name (if you have separated sidekiq)
  • REDIS_SENTINELS - a list of comma separated Redis urls (like REDIS_URL, but for sentinels)
  • REDIS_SENTINEL_ROLE - a role within the sentinel to connect (default: master)
  • REDIS_DISABLE_CLIENT_ID - a flag to disable CLIENT command in Sidekiq

💡 Note, that REDIS_URL and REDIS_HOST are exclusive. Since REDIS_HOST is more atomic value it will be checked after REDIS_URL.

💡 REDIS_SENTINELS will be parsed with URI, because of that it's mandatory for them to be formatted with protocol redis://....

💡 REDIS_DISABLE_CLIENT_ID might be required if a SaaS Redis provider used.

Examples

If you don't have a running Redis instance, you can quickly spin an empty to practice.

$ docker run -d --rm --name redis-instance redis

and then run an exporter

$ docker run -it --rm \
             --link redis-instance \
             -p 9292:9292 \
             -e REDIS_URL=redis://redis-instance \
             strech/sidekiq-prometheus-exporter