We are using a vertx based service. We need to monitor the database connections and thread utilized count. I tried to create a custom JMX measure for it. While browsing the metric in that service, I did not find any relevant measures in the list.
I took a CPU sample of the transaction and found vertex-worker thread. Can I utilize that data to create the measures?
How can I go about finding the attributes?
Sometimes Prosper mbeans has to be turned on. Without this you will not able to create proper jmx measure. About creating custom measure based on method in code. Right now it’s not possible. There is preview for this:
But if there is option to retrace value you need for example via bash, it may be better idea to write simple OneAgent plugin that will get metrics you need and push them to further details tab on process card. But first check if there are any mbeans that can be turned on for jmx plugin.
Sorry, my bad 🙂 but about JMX there is the same story. You will be able to create measure when you will enable proper mBean there.
About CPU sampling results, if there are any methods that has return value or parameter that contains values you need, you can create sensors on those methods and measures that will extract those values. After this you will be able to chart them. The measure you will need are Method Argument Value or Method Return Value. Remember that first you need to make sensor that will capture argument or return value that you need.