theforeman / smart_proxy_monitoring

Smart proxy plugin for monitoring system integration
GNU General Public License v3.0
7 stars 10 forks source link

wrong credentials in monitoring_icingadirector.yml but no error message in the UI #10

Closed hboetes closed 7 years ago

hboetes commented 7 years ago

I just enabled monitoring_icingadirector.yml, and tried to add the monitoring proxy. After commiting, the monitoring proxy host is empty again and in the foreman proxy log I get this error:

D, [2017-05-23T09:51:43.324846 ] DEBUG -- : 401 Unauthorized (RestClient::Unauthorized)
/usr/lib/ruby/vendor_ruby/restclient/abstract_response.rb:74:in `return!'
/usr/lib/ruby/vendor_ruby/restclient/request.rb:495:in `process_result'
/usr/lib/ruby/vendor_ruby/restclient/request.rb:421:in `block in transmit'
/usr/lib/ruby/2.3.0/net/http.rb:853:in `start'
/usr/lib/ruby/vendor_ruby/restclient/request.rb:413:in `transmit'
/usr/lib/ruby/vendor_ruby/restclient/request.rb:176:in `execute'
/usr/lib/ruby/vendor_ruby/restclient/request.rb:41:in `execute'
/usr/lib/ruby/vendor_ruby/restclient/resource.rb:51:in `get'
/var/lib/gems/2.3.0/gems/smart_proxy_monitoring-0.1.0/lib/smart_proxy_monitoring_icingadirector/director_client.rb:25:in `get'
/var/lib/gems/2.3.0/gems/smart_proxy_monitoring-0.1.0/lib/smart_proxy_monitoring_icingadirector/monitoring_icingadirector_main.rb:8:in `query_host'
/var/lib/gems/2.3.0/gems/smart_proxy_monitoring-0.1.0/lib/smart_proxy_monitoring/monitoring_api.rb:20:in `block in <class:Api>'
/usr/lib/ruby/vendor_ruby/sinatra/base.rb:1610:in `call'
/usr/lib/ruby/vendor_ruby/sinatra/base.rb:1610:in `block in compile!'
/usr/lib/ruby/vendor_ruby/sinatra/base.rb:975:in `block (3 levels) in route!'
/usr/lib/ruby/vendor_ruby/sinatra/base.rb:994:in `route_eval'
/usr/lib/ruby/vendor_ruby/sinatra/base.rb:975:in `block (2 levels) in route!'
/usr/lib/ruby/vendor_ruby/sinatra/base.rb:1015:in `block in process_route'
/usr/lib/ruby/vendor_ruby/sinatra/base.rb:1013:in `catch'
/usr/lib/ruby/vendor_ruby/sinatra/base.rb:1013:in `process_route'
/usr/lib/ruby/vendor_ruby/sinatra/base.rb:973:in `block in route!'
/usr/lib/ruby/vendor_ruby/sinatra/base.rb:972:in `each'
/usr/lib/ruby/vendor_ruby/sinatra/base.rb:972:in `route!'
/usr/lib/ruby/vendor_ruby/sinatra/base.rb:1085:in `block in dispatch!'
/usr/lib/ruby/vendor_ruby/sinatra/base.rb:1067:in `block in invoke'
/usr/lib/ruby/vendor_ruby/sinatra/base.rb:1067:in `catch'
/usr/lib/ruby/vendor_ruby/sinatra/base.rb:1067:in `invoke'
/usr/lib/ruby/vendor_ruby/sinatra/base.rb:1082:in `dispatch!'
/usr/lib/ruby/vendor_ruby/sinatra/base.rb:907:in `block in call!'
/usr/lib/ruby/vendor_ruby/sinatra/base.rb:1067:in `block in invoke'
/usr/lib/ruby/vendor_ruby/sinatra/base.rb:1067:in `catch'
/usr/lib/ruby/vendor_ruby/sinatra/base.rb:1067:in `invoke'
/usr/lib/ruby/vendor_ruby/sinatra/base.rb:907:in `call!'
/usr/lib/ruby/vendor_ruby/sinatra/base.rb:895:in `call'
/usr/lib/ruby/vendor_ruby/rack/commonlogger.rb:33:in `call'
/usr/lib/ruby/vendor_ruby/sinatra/base.rb:219:in `call'
/usr/share/foreman-proxy/lib/proxy/log.rb:109:in `call'
/usr/share/foreman-proxy/lib/proxy/request_id_middleware.rb:9:in `call'
/usr/lib/ruby/vendor_ruby/rack/protection/xss_header.rb:18:in `call'
/usr/lib/ruby/vendor_ruby/rack/protection/path_traversal.rb:16:in `call'
/usr/lib/ruby/vendor_ruby/rack/protection/json_csrf.rb:18:in `call'
/usr/lib/ruby/vendor_ruby/rack/protection/base.rb:49:in `call'
/usr/lib/ruby/vendor_ruby/rack/protection/base.rb:49:in `call'
/usr/lib/ruby/vendor_ruby/rack/protection/frame_options.rb:31:in `call'
/usr/lib/ruby/vendor_ruby/rack/nulllogger.rb:9:in `call'
/usr/lib/ruby/vendor_ruby/rack/head.rb:13:in `call'
/usr/lib/ruby/vendor_ruby/sinatra/show_exceptions.rb:25:in `call'
/usr/lib/ruby/vendor_ruby/sinatra/base.rb:182:in `call'
/usr/lib/ruby/vendor_ruby/sinatra/base.rb:2013:in `call'
/usr/lib/ruby/vendor_ruby/sinatra/base.rb:1487:in `block in call'
/usr/lib/ruby/vendor_ruby/sinatra/base.rb:1787:in `synchronize'
/usr/lib/ruby/vendor_ruby/sinatra/base.rb:1487:in `call'
/usr/lib/ruby/vendor_ruby/rack/urlmap.rb:66:in `block in call'
/usr/lib/ruby/vendor_ruby/rack/urlmap.rb:50:in `each'
/usr/lib/ruby/vendor_ruby/rack/urlmap.rb:50:in `call'
/usr/lib/ruby/vendor_ruby/rack/builder.rb:153:in `call'
/usr/lib/ruby/vendor_ruby/rack/handler/webrick.rb:88:in `service'
/usr/lib/ruby/2.3.0/webrick/httpserver.rb:140:in `service'
/usr/lib/ruby/2.3.0/webrick/httpserver.rb:96:in `run'
/usr/lib/ruby/2.3.0/webrick/server.rb:296:in `block in start_thread'
I, [2017-05-23T09:51:43.326085 ]  INFO -- : 172.31.10.129 - - [23/May/2017:09:51:43 +0200] "GET /monitoring/host/lars.example.com HTTP/1.1" 400 18 0.0391
timogoebel commented 7 years ago

@hboetes : Thanks for your issue. https://github.com/theforeman/smart_proxy_monitoring/pull/13 and https://github.com/theforeman/foreman_monitoring/pull/20 should solve this.

timogoebel commented 7 years ago

PRs have been merged. Thanks @hboetes for the feedback.