Hi..
Is there any way to get JVM Health or startup time via a REST APIs?
Any help would be appreciated?
Thanks,
Antoine
Answer by Andreas G. ·
If you say it takes 10 seconds. How many agents do you have in your system?
Also - would you mind creating an RFE Post in Product Feedback and Enhancement Requests that explains the filter options you would like to see? Is Filter by Agent name enough? Or would you need Agent Group? The postings in the RFE Forum help our Product Management Team to prioritize road map items for upcoming releases
Answer by Andreas G. ·
FYI - there is REST Interface that gives you the list of all agents without needing to query the Agent Overview Dashlet via the Reporting REST Interface. Check out Agents and Collectors (REST)
Hi Andreas,
That is the REST endpoint I'm hitting. https://<server>:<port>/rest/management/agents?filter=ag:AgentGroups?app
In the agents overview dashboard, the Agent Group is 'app'. When trying to filter by Agent Group, the endpoint I'm trying to hit is: https://<server>:<port>/rest/management/agents?filter=ag:AgentGroups?app
Unfortunately, this is still returning me all of the agents on that particular server. Is my filter correct?
The /rest/management/agents REST Endpoint doesnt support the filter option. But - as it returns XML which includes the AGent Group it should be easy to just focus on those agents of that particular group. You can also use some XSLT transformation to do the filtering on top of the XML. I assume you are coding a small helper app to execute that request. If you use Java or .NET (or any other language) you can use helper libraries that allow you to easily filter the XML.
Which REST endpoint supports the agent filter?
I have Java (JAXB) code which converts the agents to objects and does the filtering of the agents I want, but I was hoping to filter the response from the endpoint to decrease the payload sent back from the endpoint. When we hit the /rest/management/agents endpoint it takes over 10+ seconds to return.
Thanks again for the responses.
Answer by Antoine M. ·
Thanks David. Yes I'm aware of the Custom JMX to get the JVM status. We've used similar measures for other attributes from our App Server. But wanted to know if there was something more portable. In our case, we have a development server with multiple profiles that have suite of apps. When using CUstom JMX, I would need to create the same type of measure in each system profile as opposed to just switching the profile.
Answer by Dave M. ·
Browsing the available JMX metrics for the JVM, I see Uptime and StartTime are present, so these might be helpful.
I don't think we offer a way to access this information using our REST interfaces.
Getting the start time can be done as follows:
To get JVM health, put the desired JVM measures on a dashboard and query them via REST.
Generally, please be careful with this approach, since retrieving large XML documents from the server consumes lots of server memory. Use filters to restrict the amount of data as much as possible and do not run these queries more often than needed.
Hi Markus.
Thanks for responding.
Our team has been using the agents overview dashboard and getting the results via the REST API.. It is a bit slow as the XML response is very large.
I saw the REST Agent Filters available in the documentation and having a bit of a hard time filtering the agents coming back in the agents overview dashboard. For example, in the agents overview dashboard, the Agent Group is 'app'. When trying to filter by Agent Group, the endpoint I'm trying to hit is: https://<server>:<port>/rest/management/agents?filter=ag:AgentGroups?app
Unfortunately, this is still returning me all of the agents on that particular server. Is my filter correct? I assume it is not. I'm using DT 5.5
Thanks in advance
JANUARY 15, 3:00 PM GMT / 10:00 AM ET