Permalink
Browse files

jmx2munin: give a default value for config.

This allows for users to use the plugin as a wildcard one, which is
more in line with Munin itself.
  • Loading branch information...
1 parent 46d11d4 commit bebcb2920ffa580876f5158b982fc6a841eadee9 @Flameeyes Flameeyes committed Aug 10, 2012
Showing with 2 additions and 0 deletions.
  1. +2 −0 contrib/jmx2munin.sh
View
2 contrib/jmx2munin.sh
@@ -23,6 +23,8 @@ if [ -z "$url" ]; then
url="service:jmx:rmi:///jndi/rmi://127.0.0.1:7199/jmxrmi"
fi
+[ -z "$config" ] && config="${0#*_}"
+
if [ -z "$config" -o -z "$query" -o -z "$url" ]; then
echo "Configuration needs attributes config, query and optinally url"
exit 1

0 comments on commit bebcb29

Please sign in to comment.