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

Interacting with secure Jenkins #8

Closed rgeddis closed 8 years ago

rgeddis commented 8 years ago

Trying to use this plugin to monitor jobs on running on a secure instance of Jenkins, however there doesn't seem to be a method to allow passing of the credentials through to the api client. Locally I have been using:

   def jenkins_api_client
     @jenkins_api_client ||= JenkinsApi::Client.new(
-      server_ip: config[:server_api_url],
+      server_url: config[:server_api_url],
       log_level: config[:client_log_level].to_i
     )
   end

Not sure if this is the best method for everybody, however I'd be happy to submit a pull request after there is feedback on the best solution.

analytically commented 8 years ago

Hi, yeah would love to see a PR!

analytically commented 8 years ago

Also, mind updating the jenkins gem to 1.4.2 and testing all scripts? https://github.com/arangamani/jenkins_api_client/blob/master/CHANGELOG.md

rgeddis commented 8 years ago

9

analytically commented 8 years ago

Merged, thanks!