简体   繁体   中英

I want to get a metrics from host and jmx port through java

I got the metrics from JMX port by using the Nagios agent through curl command here is the syntax.

curl -s -X POST http://${hostname}:${agentport}/p1/kdc/monitor -d " {\"hostname\": \"${hostname}\", \"port\": \"${jmxport}\", \"metric\": \"${metric}\"}"'

curl -s -X POST http://manikya.devops.com/p1/kdc/monitor -d '{"hostname":"manikya.devops.com", "port":"9999", "metric": "bytes_in_per_second"}'

I want the same thing by Java.

There are a large number of JMX plug-ins available on the Nagios Exchange that give you what you want, you can find them here: Nagios/JMX plug-ins

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM