katzj/jenkins-to-graphite — pull request #1 by bd808 (2012-03-23 20:06:22+00:00)
Title: Additional features

I added some features to your script that are useful in our environment. I thought I'd offer them up in thanks for your base script that saved me some energy in figuring out how to query the server. Feel free to cherry-pick the parts you like or reject the change set outright.

* Don't send auth header if no user or password is supplied
This was causing a 401 response from our server even though the operations requested by the script are available to the "anonymous" user.

* Configurable metric prefix.
We organize Graphite metrics by data center and host and wanted the ability to have these metrics stored at the same level as other services on the monitored host. When no command line option is given the metrics are stored under the default "jenkins" prefix as before.

* Monitoring for job status
Added a "--jobs view_name" command line option that will pull the current info for the given dashboard view and track the status of the jobs it contains. We use this to monitor our "Everything" view which list all jobs registered with the Jenkins server.