enable yabeda sidekiq metrics

a webserver is launched with the sidekiq process. It listen on the 9394 port and bind on 0.0.0.0 by default.
This commit is contained in:
simon lehericey 2024-03-28 11:25:37 +01:00
parent 1bd6260df4
commit 4c0b6fd93a
No known key found for this signature in database
GPG key ID: CDE670D827C7B3C5
2 changed files with 11 additions and 0 deletions

View file

@ -246,6 +246,12 @@ REDIS_SIDEKIQ_MASTER='master_name'
REDIS_SIDEKIQ_PASSWORD='sentinel_and_redis_password'
REDIS_SIDEKIQ_USERNAME='sentinel_and_redis_username'
# configuration for prometheus metrics web server
# launched with sidekiq
PROMETHEUS_EXPORTER_BIND="0.0.0.0"
PROMETHEUS_EXPORTER_PORT="9394"
PROMETHEUS_EXPORTER_ENABLED="disabled"
# Setup log level, info if nil
# can be debug, info, warn, error, fatal, and unknown
DS_LOG_LEVEL='info'

View file

@ -16,6 +16,11 @@ if ENV.has_key?('REDIS_SIDEKIQ_SENTINELS')
role: :master
}
if ENV['PROMETHEUS_EXPORTER_ENABLED'] == 'enabled'
Yabeda.configure!
Yabeda::Prometheus::Exporter.start_metrics_server!
end
if ENV['SKIP_RELIABLE_FETCH'].blank?
Sidekiq::ReliableFetch.setup_reliable_fetch!(config)
end