health-monitor-rails icon indicating copy to clipboard operation
health-monitor-rails copied to clipboard

Add support for multiple same type providers.

Open mimosa opened this issue 5 years ago • 1 comments

For example, I want to check the sidekiq of redis and the redis of cache separately.

HealthMonitor.configure do |config|
  config.redis.configure do |c|
    c.connection = Redis.current
    c.provider_name = 'Redis(Cache)'
    c.max_used_memory = 200
  end

  config.redis.configure do |c|
    c.connection = Sidekiq.configure_server.redis
    c.provider_name = 'Redis(Sidekiq)'
    c.max_used_memory = 200
  end
end

mimosa avatar Oct 16 '19 03:10 mimosa

That's an interesting suggestion. I hope to find some time in the next couple of weeks to work on it. At the time being, you can achieve this by wrapping the second check as a custom provider.

lbeder avatar Oct 18 '19 08:10 lbeder