Permalink
Browse files

Fix caching of multiple jmx sources on a single node and ambiguous ca…

…che lookup
  • Loading branch information...
1 parent c5389af commit 03f9464aa1f2dd1f617dc3827d4f0175d231da02 @rstml rstml committed May 8, 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 03f9464

Please sign in to comment.