AppD Archive

Add the sum of two MBeans as on metric on a JMX graph

CommunityUser
Splunk Employee
Splunk Employee

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,

0 Karma

Arun_Dasetty
Super Champion

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

0 Karma

CommunityUser
Splunk Employee
Splunk Employee

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?

0 Karma

Arun_Dasetty
Super Champion

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

0 Karma

CommunityUser
Splunk Employee
Splunk Employee

Oh right, cool, I'll give it a go!

0 Karma
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.
Get Updates on the Splunk Community!

Tech Talk Recap | Mastering Threat Hunting

Mastering Threat HuntingDive into the world of threat hunting, exploring the key differences between ...

Observability for AI Applications: Troubleshooting Latency

If you’re working with proprietary company data, you’re probably going to have a locally hosted LLM or many ...

Splunk AI Assistant for SPL vs. ChatGPT: Which One is Better?

In the age of AI, every tool promises to make our lives easier. From summarizing content to writing code, ...