myplanetdigital-experimental / sensu-drupal-vagrant

1 stars 0 forks source link

Create a nagios check for monitoring jenkins plugin versions #1

Open patcon opened 11 years ago

patcon commented 11 years ago

Example code:

curl "http://user:pass@ci.example.com/pluginManager/api/xml?depth=1&xpath=/*/*/shortName|/*/*/version&wrapper=plugins" | xmllint --format -

Ref:

Still need to figure out a way to check this against the most recent versions

patcon commented 11 years ago

Can use this to parse jenkins updates data: https://github.com/jnunemaker/httparty/blob/master/examples/custom_parsers.rb

It's in JSONP, so will need something like this in the custom parser:

response.body.gsub! /^[\w\.]+\((.*)\);?$/m, '\\1'

httparty will follow redirects of http://updates.jenkins-ci.org/update-center.json to http://ftp-chi.osuosl.org/pub/jenkins/updates/update-center.json, but net-http won't.

patcon commented 11 years ago

Actually, this might solve our need: https://github.com/Ericbla/check_jenkins/blob/master/check_jenkins_version.pl