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

Support username/password for jenkins_client_api #14

Closed dkiser closed 7 years ago

dkiser commented 7 years ago

In order to support authenticated Jenkins URL's, please add username and password options to the functions below throughout the plugin.

  def jenkins
    @jenkins ||= JenkinsApi::Client.new(server_url: config[:url], log_level: 3)
  end

https://github.com/arangamani/jenkins_api_client suggest username and password args as so:

@client = JenkinsApi::Client.new(:server_ip => '0.0.0.0',
         :username => 'somename', :password => 'secret password')
eheydrick commented 7 years ago

This would be a nice addition. I'd take a PR adding it.

seth-paxton commented 7 years ago

Just submitted a PR for this if you want to use it.

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

sstarcher commented 7 years ago

15 should close this