prometheus-client rubygem 1.0 has been finally released, it fixed one of the major pain-points of supporting multiple instances by sharing metric storage surprisingly in a simple file. I’ve been in touch with the developers, if you want more details there is exciting talk available from RubyConf 2019:
I’ve just bumped our RPM dependency we carry in our repos, for Debian there is nothing to wait for:
To start monitoring Foreman via Prometheus simply:
yum -y install foreman-telemetry prometheus-client
And enable it in
:telemetry: :prefix: 'fm_rails' :statsd: :enabled: false :host: '127.0.0.1:8125' :protocol: 'statsd' :prometheus: :enabled: true :logger: :enabled: false :level: 'INFO'
Then make Prometheus to scrape
/metrics endpoint. The client library will now work under Passenger or any other forking server giving the correct numbers.