From e195de95f4bf2ee4ad2d742cfd2f7eb1e47bdfc4 Mon Sep 17 00:00:00 2001 From: Holger Levsen Date: Wed, 15 Mar 2017 17:03:29 +0100 Subject: deal with jenkins not running Signed-off-by: Holger Levsen --- hosts/jenkins/etc/munin/plugins/jenkins_jstats | 2 ++ 1 file changed, 2 insertions(+) (limited to 'hosts/jenkins') diff --git a/hosts/jenkins/etc/munin/plugins/jenkins_jstats b/hosts/jenkins/etc/munin/plugins/jenkins_jstats index 6e006b0d..2df10f06 100755 --- a/hosts/jenkins/etc/munin/plugins/jenkins_jstats +++ b/hosts/jenkins/etc/munin/plugins/jenkins_jstats @@ -42,6 +42,8 @@ if [ -f $STATEFILE ] && [ "$1" = "" ] ; then fi JENKINS_PID=$(jps |grep jenkins.war|cut -d "j" -f1) +if [ "$JENKINS_PID" = "" ] ; then exit 0 ; fi + JOB_PREFIXES=$(for i in $(jstat -gc $JENKINS_PID | head -1) ; do echo -n "$i " ; done) if [ "$1" = "config" ]; then echo 'graph_title jenkins.war jstat -gc (mostly KB shown)' -- cgit v1.2.3-70-g09d2