sensu-plugins / sensu-plugins-jenkins

This plugin provides native Jenkins instrumentation for monitoring and metrics collection, including: health, job status, metrics via `JQS`, and others.
http://sensu-plugins.io
MIT License
9 stars 18 forks source link

Invalid hostname error when running check-jenkins #4

Closed anthcourtney closed 9 years ago

anthcourtney commented 9 years ago

The URL which is being constructed by the check-jenkins.rb plugin is missing a forward slash between the port and the uri components.

# /usr/local/bin/check-jenkins.rb
Check failed to run: the scheme http does not accept registry part: localhost:8080metrics (or bad hostname?), ["/usr/share/ruby/uri/generic.rb:214:in `initialize'", "/usr/share/ruby/uri/http.rb:84:in `initialize'", "/usr/share/ruby/uri/common.rb:214:in `new'", "/usr/share/ruby/uri/common.rb:214:in `parse'", "/usr/share/ruby/uri/common.rb:747:in `parse'", "/usr/local/share/gems/gems/rest-client-1.8.0/lib/restclient/request.rb:276:in `parse_url'", "/usr/local/share/gems/gems/rest-client-1.8.0/lib/restclient/request.rb:280:in `parse_url_with_auth'", "/usr/local/share/gems/gems/rest-client-1.8.0/lib/restclient/request.rb:175:in `execute'", "/usr/local/share/gems/gems/rest-client-1.8.0/lib/restclient/request.rb:41:in `execute'", "/usr/local/share/gems/gems/rest-client-1.8.0/lib/restclient/resource.rb:51:in `get'", "/usr/local/share/gems/gems/sensu-plugins-jenkins-0.0.4/bin/check-jenkins.rb:63:in `run'", "/usr/local/share/gems/gems/sensu-plugin-1.2.0/lib/sensu-plugin/cli.rb:56:in `block in <class:CLI>'"]
anthcourtney commented 9 years ago

https://github.com/sensu-plugins/sensu-plugins-jenkins/pull/5