ruby - [promethues, rails]How to enable promethues on rails server -
i have live rails application.
and trying install prometheus monitoring service , ruby client
i running on server thses tutorial.
it working good!
but after hours these merics url died.
how working on live server?
if adding exist project.
below, promethus not found error
i, [2015-08-31t10:54:40.274066 #3542] info -- : refreshing gem list /path/shared/bundle/ruby/2.2.0/gems/activesupport-4.1.6/lib/active_support/dependencies.rb:247:in `require': cannot load such file -- prometheus/client/rack/collector (loaderror) /path/shared/bundle/ruby/2.2.0/gems/activesupport-4.1.6/lib/active_support/dependencies.rb:247:in `block in require' /path/shared/bundle/ruby/2.2.0/gems/activesupport-4.1.6/lib/active_support/dependencies.rb:232:in `load_dependency' /path/shared/bundle/ruby/2.2.0/gems/activesupport-4.1.6/lib/active_support/dependencies.rb:247:in `require' config.ru:8:in `block in <main>' /path/shared/bundle/ruby/2.2.0/gems/rack-1.5.5/lib/rack/builder.rb:55:in `instance_eval' /path/shared/bundle/ruby/2.2.0/gems/rack-1.5.5/lib/rack/builder.rb:55:in `initialize' config.ru:1:in `new' config.ru:1:in `<main>' /path/shared/bundle/ruby/2.2.0/gems/unicorn-4.9.0/lib/unicorn.rb:48:in `eval' /path/shared/bundle/ruby/2.2.0/gems/unicorn-4.9.0/lib/unicorn.rb:48:in `block in builder' /path/shared/bundle/ruby/2.2.0/gems/unicorn-4.9.0/lib/unicorn/http_server.rb:768:in `call' /path/shared/bundle/ruby/2.2.0/gems/unicorn-4.9.0/lib/unicorn/http_server.rb:768:in `build_app!' /path/shared/bundle/ruby/2.2.0/gems/unicorn-4.9.0/lib/unicorn/http_server.rb:632:in `init_worker_process' path/shared/bundle/ruby/2.2.0/gems/unicorn-4.9.0/lib/unicorn/http_server.rb:655:in `worker_loop' /path/shared/bundle/ruby/2.2.0/gems/unicorn-4.9.0/lib/unicorn/http_server.rb:529:in `spawn_missing_workers' /path/shared/bundle/ruby/2.2.0/gems/unicorn-4.9.0/lib/unicorn/http_server.rb:540:in `maintain_worker_count' /path/shared/bundle/ruby/2.2.0/gems/unicorn-4.9.0/lib/unicorn/http_server.rb:294:in `join' /path/shared/bundle/ruby/2.2.0/gems/unicorn-4.9.0/bin/unicorn:126:in `<top (required)>' /path/shared/bundle/ruby/2.2.0/bin/unicorn:23:in `load' /path/shared/bundle/ruby/2.2.0/bin/unicorn:23:in `<main>'
eg.)
i have 2 server(promethus_server, live_server + prometheus client)
live_server, promethus_client path different path.
i runnning promethus_client manually on server
$ rails new client $ bundle (adding promethus-client gem) $ vi config.ru (add promethus lib) $ rail s --binding=ip
is ircorrect?
here's config.ru
looks recent app upgraded:
require ::file.expand_path('../config/environment', file) require 'rack' require 'prometheus/client/rack/collector' require 'prometheus/client/rack/exporter' use prometheus::client::rack::collector use prometheus::client::rack::exporter run rails.application
Comments
Post a Comment