Permalink
Browse files

Merge pull request #3 from rstml/master

Fix for sample munin plugin script
  • Loading branch information...
2 parents c5389af + 03f9464 commit 73525023934c785d78a9432d32b682b2b2318a9f @tcurdt committed May 12, 2012
Showing with 3 additions and 2 deletions.
  1. +3 −2 contrib/jmx2munin.sh
View
@@ -37,7 +37,8 @@ if [ "$1" = "config" ]; then
fi
JAR="$JMX2MUNIN_DIR/jmx2munin.jar"
-CACHED="/tmp/jmx2munin"
+URLSUM=`echo -n "$url" | cksum | cut -d ' ' -f 1`
+CACHED="/tmp/jmx2munin.$URLSUM"
if test ! -f $CACHED || test `find "$CACHED" -mmin +2`; then
@@ -58,7 +59,7 @@ if [ -z "$ATTRIBUTES" ]; then
fi
for ATTRIBUTE in $ATTRIBUTES; do
- grep $ATTRIBUTE $CACHED
+ grep "$ATTRIBUTE\." $CACHED
done
exit 0

0 comments on commit 7352502

Please sign in to comment.