diff options
author | Holger Levsen <holger@layer-acht.org> | 2012-11-09 14:52:09 +0100 |
---|---|---|
committer | Holger Levsen <holger@layer-acht.org> | 2012-11-09 14:52:09 +0100 |
commit | 0230bc5625de2ad89ec5dcb2bc8611777ccb9060 (patch) | |
tree | 42328f5eb12beefc823cdb50d72691452461e9e4 /etc/munin/plugins/jenkins_jobs | |
parent | 0564aa251313caffc5517dc45914455a724a241e (diff) | |
download | jenkins.debian.net-0230bc5625de2ad89ec5dcb2bc8611777ccb9060.tar.xz |
graph build results. autodetect job categories based on name prefix
Diffstat (limited to 'etc/munin/plugins/jenkins_jobs')
-rwxr-xr-x | etc/munin/plugins/jenkins_jobs | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/etc/munin/plugins/jenkins_jobs b/etc/munin/plugins/jenkins_jobs index 170a0333..a93967a2 100755 --- a/etc/munin/plugins/jenkins_jobs +++ b/etc/munin/plugins/jenkins_jobs @@ -5,7 +5,7 @@ =head1 NAME -jenkins_jobs - Plugin to measure number of jenknis jobs +jenkins_jobs - Plugin to measure number of jenkins jobs =head1 AUTHOR @@ -29,6 +29,7 @@ if [ "$1" = "autoconf" ]; then exit 0 fi +JOB_PREFIXES=$(ls -1 /var/lib/jenkins/jobs/|cut -d "-" -f1-2|sort -u) if [ "$1" = "config" ]; then echo 'graph_title Jenkins Jobs' @@ -37,11 +38,11 @@ if [ "$1" = "config" ]; then echo 'graph_total total' echo 'graph_vlabel Jenkins Jobs per category' echo 'graph_category jenkins' + draw=AREA for PREFIX in $JOB_PREFIXES ; do echo "jenkins_jobs_$PREFIX.label $PREFIX jobs" - echo "jenkins_jobs_$PREFIX.draw STACK" - #print_warning jenkins_jobs_$PREFIX - #print_critical jenkins_jobs_$PREFIX + echo "jenkins_jobs_$PREFIX.draw $draw" + if [ "$draw" = "AREA" ] ; then draw=STACK ; fi done exit 0 fi |