diff options
author | Holger Levsen <holger@layer-acht.org> | 2012-11-10 00:24:04 +0100 |
---|---|---|
committer | Holger Levsen <holger@layer-acht.org> | 2012-11-10 00:24:04 +0100 |
commit | 075deb383e9f2726f1803093a44f4108beabd6ca (patch) | |
tree | eec0ebd9fe171f3d02022df507f7ef518c648353 /etc/munin | |
parent | fbdd445e8ac1fe53ce0583d1697959bcaf47ff2d (diff) | |
download | jenkins.debian.net-075deb383e9f2726f1803093a44f4108beabd6ca.tar.xz |
quite some munin plugin fixes
Diffstat (limited to 'etc/munin')
-rwxr-xr-x | etc/munin/plugins/jenkins_builds | 2 | ||||
-rwxr-xr-x | etc/munin/plugins/jenkins_builds_results | 5 | ||||
-rwxr-xr-x | etc/munin/plugins/jenkins_builds_running | 1 | ||||
-rwxr-xr-x | etc/munin/plugins/jenkins_jobs | 2 |
4 files changed, 5 insertions, 5 deletions
diff --git a/etc/munin/plugins/jenkins_builds b/etc/munin/plugins/jenkins_builds index 9cb2d2d8..c2d0fea6 100755 --- a/etc/munin/plugins/jenkins_builds +++ b/etc/munin/plugins/jenkins_builds @@ -48,6 +48,6 @@ if [ "$1" = "config" ]; then fi for PREFIX in $JOB_PREFIXES ; do - NR=$(find /var/lib/jenkins/jobs/$PREFIX*/builds/* -type d -mtime -1 | wc -l) + NR=$(find /var/lib/jenkins/jobs/$PREFIX*/builds/ -type d -mtime -1 -name "*_*"| wc -l) echo "jenkins_builds_$PREFIX.value $NR" done diff --git a/etc/munin/plugins/jenkins_builds_results b/etc/munin/plugins/jenkins_builds_results index ec299f4f..2dfb7310 100755 --- a/etc/munin/plugins/jenkins_builds_results +++ b/etc/munin/plugins/jenkins_builds_results @@ -50,8 +50,9 @@ if [ "$1" = "config" ]; then fi for PREFIX in $JOB_PREFIXES ; do - for STATE in success unstable failed ; do - NR=$( (for i in /var/lib/jenkins/jobs/${PREFIX}*/builds/*/log ; do tail -1 $i ; done ) | grep -i -c $STATE) + for STATE in success unstable failed ; do + NR=0 + NR=$( (for i in /var/lib/jenkins/jobs/${PREFIX}*/builds/*/log ; do tail -1 $i 2>/dev/null; done ) | grep -i -c $STATE) NR=$(echo "$NR/2"|bc) echo "jenkins_builds_results_${PREFIX}_${STATE}.value $NR" done diff --git a/etc/munin/plugins/jenkins_builds_running b/etc/munin/plugins/jenkins_builds_running index c4624473..4a211e79 100755 --- a/etc/munin/plugins/jenkins_builds_running +++ b/etc/munin/plugins/jenkins_builds_running @@ -29,7 +29,6 @@ if [ "$1" = "autoconf" ]; then exit 0 fi -JOB_PREFIXES=$(ls -1 /var/lib/jenkins/jobs/|cut -d "_" -f1|sort -u) if [ "$1" = "config" ]; then echo 'graph_title Jenkins Builds running' diff --git a/etc/munin/plugins/jenkins_jobs b/etc/munin/plugins/jenkins_jobs index 8502525c..6d2619c2 100755 --- a/etc/munin/plugins/jenkins_jobs +++ b/etc/munin/plugins/jenkins_jobs @@ -48,6 +48,6 @@ if [ "$1" = "config" ]; then fi for PREFIX in $JOB_PREFIXES ; do - NR=$(find /var/lib/jenkins/jobs/ -name "$PREFIX*" -type d | wc -l) + NR=$(find /var/lib/jenkins/jobs/ -maxdepth 1 -name "$PREFIX*" -type d | wc -l) echo "jenkins_jobs_$PREFIX.value $NR" done |