This is an example of how to write an exporter for Prometheus in Python.
For more information see http://www.robustperception.io/writing-a-jenkins-exporter-in-python
For production use, we recommend https://github.com/lovoo/jenkins_exporter which improves on this example.