Is it possible to create my own Mbean attribute which is a sum of two other attributes so that it can be graphed on the JMX browser? Like if I wanted to add availableConnections and borrowedConnections and have them listed as totalConnections?
Thanks,
Hi Jonathan,
We have two ways , one is to check whether the target mbean totalConnection is an exposed jmx mbean already on server, and i would request you to check in node dashboard -> JMX as stated in doc link https://docs.appdynamics.com/display/PRO41/Configure+JMX+Metrics+from+MBeans
- If the target mbean not exposed than as of now i do not see any direction that will give sum of two different mbeans but we can use rest api to gather metrics from metric browser and report back to metric browser using machine agent custom metrics feature so that it could be used in dashboard
https://docs.appdynamics.com/display/PRO41/Use+the+AppDynamics+REST+API
https://docs.appdynamics.com/display/PRO41/Extensions+and+Custom+Metrics
- Though we do not have an option to report sum of two different metrics from metric browser but if target is to get alert when the sum crosses a value, than you can use existing "create custom expression" feature in Alert & Respond -> Health rule -> add health rule -> in edit view under condition section select "custom expression" where we can get metric1+metric2 as expression
Let us know if that information helps
Hi Akumar,
Yes the two values are already exposed in the mBean browser as standard by AppDy. What I was more or less trying to achieve was a "stacked graph" so that I could tell the when the sum of two metrics reached near the maxAvailable of another mBean, i dont need it in an alert because i wanted to monitor it over time.
So you're saying I cant do that?
Hi Jonathan,
I was saying it can be done "it is possible" but that needs some custom script that will rest api response of target metrics from metric browsers (select target metric use option "Copy rest URL" ) and render that response (sum the value for two metrics and report back as new stacked metric using script from custom monitor in machine agent and report back target metric in metric browser which you could be able to use in custom dashboard
Oh right, cool, I'll give it a go!