Closed mnuessler closed 7 years ago
Hi,
I faced similar error when my Jenkins instance was unavailable:
Check failed to run: 503 Service Unavailable, ["/opt/sensu/embedded/lib/ruby/gems/2.4.0/gems/rest-client-1.8.0/lib/restclient/abstract_response.rb:74:in return!'", "/opt/sensu/embedded/lib/ruby/gems/2.4.0/gems/rest-client-1.8.0/lib/restclient/request.rb:495:inprocess_result'", "/opt/sensu/embedded/lib/ruby/gems/2.4.0/gems/rest-client-1.8.0/lib/restclient/request.rb:421:in block in transmit'", "/opt/sensu/embedded/lib/ruby/2.4.0/net/http.rb:877:instart'", "/opt/sensu/embedded/lib/ruby/gems/2.4.0/gems/rest-client-1.8.0/lib/restclient/request.rb:413:in transmit'", "/opt/sensu/embedded/lib/ruby/gems/2.4.0/gems/rest-client-1.8.0/lib/restclient/request.rb:176:inexecute'", "/opt/sensu/embedded/lib/ruby/gems/2.4.0/gems/rest-client-1.8.0/lib/restclient/request.rb:41:in execute'", "/opt/sensu/embedded/lib/ruby/gems/2.4.0/gems/rest-client-1.8.0/lib/restclient/resource.rb:51:inget'", "/opt/sensu/embedded/lib/ruby/gems/2.4.0/gems/sensu-plugins-jenkins-1.3.0/bin/check-jenkins-health.rb:73:in run'", "/opt/sensu/embedded/lib/ruby/gems/2.4.0/gems/sensu-plugin-1.4.5/lib/sensu-plugin/cli.rb:58:inblock in '"]
When the health fails (i.e. when the free disk space of a Jenkins slave drops below the threshold), then the Jenkins metrics plugin on the Jenkins master returns a HTTP status code of 500. This status code is always returned if one or more health checks failed, but the response may additionally contain a JSON body with additional information. The Sensu check (
check-jenkins-health.rb
) should evaluate that response body and provide information about which health check actually failed, but it only produces a stacktrace instead: