Build precise queries to find exactly what you need
Press ESC to close
@toimtoimtoim
Favorites0
Views
Projects0
If you need perf data for your nagios then you could use this script. I have combined other things mentioned in past reviews and added little sed magic to format perf data in correct way. Atleast for "check_jmx -U service:jmx:rmi:///jndi/rmi://localhost:8060/jmxrmi -O java.lang:type=Memory -A HeapMemoryUsage -K used -I HeapMemoryUsage -J used -vvvv -w 4248302272 -c 5498760192" output seems to be ok "JMX OK HeapMemoryUsage.used=70437104{committed=202899456;init=209715200;max=608174080;used=70437104} | committed=202899456; init=209715200; max=608174080; used=70437104;" #!/bin/sh JAVA_CMD=`which java` if [ -z $JAVA_CMD ] then if [ -x $JAVA_HOME/bin/java ] then JAVA_CMD=$JAVA_HOME/bin/java else echo JMX CRITICAL - java not found. exit 2 fi fi RDIR=`dirname $0` OUTPUT=$($JAVA_CMD -cp $RDIR/jmxquery.jar org.nagios.JMXQuery $@) EXIT_STATUS=$? STATUS=`echo $OUTPUT` VALUE=$(echo $OUTPUT | sed 's/.*{(.*)}.*/1;/' | sed 's/;/; /g') echo "$STATUS | $VALUE" exit $EXIT_STATUS
Reviewed 13 years ago