You can reformat the output value from Mbeans in JMX by way of the Custom Format Masks. This option leverages on Java's built-in string manipulation and functions. You will need to build a Java code and compile it before it becomes useful in JMX.
Documentation Link: Custom Format Masks
Here's an example to render numerical field values into a floating point and output the value with two decimal places. Here's how to do it:
You will need to build this Java program on your system, so having a Java SDK package is necessary. Copy the following code and save it as "geneosFormat.java" on your system:
*kindly ensure the directory structures and location of the geneos-plugins.jar from where you execute this command; the geneos-plugins.jar is bundled with the Netprobe.
Once compiled, it will create a hierarchy in the current direct, e.g. com/itrsgroup/jmx/masks, and generate a 'geneosFormat.class' file in there. Now build a .jar file using
you can delete the com/ directory once you have the jar file.
The sample XML for the plugin is as follows: