summaryrefslogtreecommitdiffstats
path: root/etc/munin
diff options
context:
space:
mode:
authorHolger Levsen <holger@layer-acht.org>2012-11-10 00:24:04 +0100
committerHolger Levsen <holger@layer-acht.org>2012-11-10 00:24:04 +0100
commit075deb383e9f2726f1803093a44f4108beabd6ca (patch)
treeeec0ebd9fe171f3d02022df507f7ef518c648353 /etc/munin
parentfbdd445e8ac1fe53ce0583d1697959bcaf47ff2d (diff)
downloadjenkins.debian.net-075deb383e9f2726f1803093a44f4108beabd6ca.tar.xz
quite some munin plugin fixes
Diffstat (limited to 'etc/munin')
-rwxr-xr-xetc/munin/plugins/jenkins_builds2
-rwxr-xr-xetc/munin/plugins/jenkins_builds_results5
-rwxr-xr-xetc/munin/plugins/jenkins_builds_running1
-rwxr-xr-xetc/munin/plugins/jenkins_jobs2
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