This is an example of a custom JMX YAML file for New Relic's Java agent, including value and definition, MBean, attributes, type, and names for metrics, objects, and attributes. For more information, including a video, see Custom JMX monitoring by YAML.
Here is an example of a custom JMX YAML file. YAML files are space senstive.
name: TomcatCustomversion: 1.0enabled: truejmx:- object_name: Catalina:type=Cache,host=localhost,path=/examplesmetrics:- attributes: accessCount, cacheSize, hitsCounttype: simple- object_name: Catalina:type=Connector,port=8009metrics:- attributes: bufferSize, maxHeaderCount- object_name: java.nio:type=BufferPool,name=*metrics:- attributes: Counttype: monotonically_increasing
The easiest way to find available MBeans and its associated attributes is to use the JConsole instructions for JDK 1.6.
If you need more help, check out these support and learning resources:
- Browse the Explorers Hub to get help from the community and join in discussions.
- Find answers on our sites and learn how to use our support portal.
- Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS.
- Review New Relic's data security and licenses documentation.