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/plugins/jenkins_builds_results | |
parent | fbdd445e8ac1fe53ce0583d1697959bcaf47ff2d (diff) | |
download | jenkins.debian.net-075deb383e9f2726f1803093a44f4108beabd6ca.tar.xz |
quite some munin plugin fixes
Diffstat (limited to 'etc/munin/plugins/jenkins_builds_results')
-rwxr-xr-x | etc/munin/plugins/jenkins_builds_results | 5 |
1 files changed, 3 insertions, 2 deletions
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 |