gohopper / jmxquery

Automatically exported from code.google.com/p/jmxquery
0 stars 0 forks source link

Feature Req: Add pipe to output perf data #10

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Adding a pipe to output perf data would be greatly helpful in graphing jmx 
stats.

Original issue reported on code.google.com by dre...@gmail.com on 9 Aug 2010 at 8:06

GoogleCodeExporter commented 9 years ago
Having perfdata generated by this plug-in would help make trending easier to 
deploy.

Original comment by paul.can...@gmail.com on 23 Mar 2011 at 1:00

GoogleCodeExporter commented 9 years ago
Hi, I have a small workaround for this. It's just a small linux script that 
calls the check_jmx script and parse the output to include the pipe character. 
Maybe this can be included in your shell script which calls the .jar file

- note you must enter the argument enclosed within “”. Example usage: 
./check_jmx_perfdata "-U service:jmx:rmi:///jndi/rmi://localhost:9003/jmxrmi -O 
Catalina:type=ThreadPool,name=http-8080 -A currentThreadCount"

- contents of check_jmx_perfadata:
#!/bin/sh

plugin_output=$(/root/monitoring/usr/local/nagios/libexec/check_jmx $1)

metric=$(echo $plugin_output | cut -d " " -f 4)
value=$(echo $plugin_output | cut -d " " -f 6)

echo "$plugin_output | $metric=$value"

Original comment by davevass...@gmail.com on 13 Jun 2011 at 7:55

GoogleCodeExporter commented 9 years ago
Very many thanks ..
Great work around .
Status Information: JMX OK - HeapMemoryUsage.used is -11359455923159021704
Performance Data:   HeapMemoryUsage.used=-11359455923159021704

Original comment by infraste...@gmail.com on 23 Sep 2011 at 2:25