• Forums
    • Public Forums
      • Community Connect
      • Dynatrace
        • Dynatrace Open Q&A
      • Application Monitoring & UEM
        • AppMon & UEM Open Q&A
      • Network Application Monitoring
        • NAM Open Q&A
  • Home /
  • Public Forums /
  • Application Monitoring & UEM /
  • AppMon & UEM Open Q&A /
avatar image
Question by Antoine M. · Sep 05, 2014 at 03:04 AM ·

JVM Health & Metrics via REST

Hi..

Is there any way to get JVM Health or startup time via a REST APIs?

 

Any help would be appreciated?

 

Thanks,

Antoine

Comment

People who like this

0 Show 0
10 |2000000 characters needed characters left characters exceeded
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Toggle Comment visibility. Current Visibility: Viewable by all users

Up to 10 attachments (including images) can be used with a maximum of 50.0 MiB each and 250.0 MiB total.

5 Replies

  • Sort: 
  • Most voted
  • Newest
  • Oldest
avatar image

Answer by Naveen M. · Dec 19, 2014 at 03:33 AM

I am also looking for the same but not sure where to start?

Comment

People who like this

0 Show 0 · Share
10 |2000000 characters needed characters left characters exceeded
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Toggle Comment visibility. Current Visibility: Viewable by all users

Up to 10 attachments (including images) can be used with a maximum of 50.0 MiB each and 250.0 MiB total.

avatar image

Answer by Andreas G. · Sep 08, 2014 at 07:14 AM

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

Comment

People who like this

0 Show 0 · Share
10 |2000000 characters needed characters left characters exceeded
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Toggle Comment visibility. Current Visibility: Viewable by all users

Up to 10 attachments (including images) can be used with a maximum of 50.0 MiB each and 250.0 MiB total.

avatar image

Answer by Andreas G. · Sep 05, 2014 at 08:28 AM

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)

Comment

People who like this

0 Show 3 · Share
10 |2000000 characters needed characters left characters exceeded
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Toggle Comment visibility. Current Visibility: Viewable by all users

Up to 10 attachments (including images) can be used with a maximum of 50.0 MiB each and 250.0 MiB total.

avatar image Antoine M. · Sep 06, 2014 at 01:08 AM 0
Share

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?


 

avatar image Andreas G. ♦ Antoine M. · Sep 06, 2014 at 01:13 AM 0
Share

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.

avatar image Antoine M. Andreas G. ♦ · Sep 06, 2014 at 03:39 AM 0
Share

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.

avatar image

Answer by Antoine M. · Sep 05, 2014 at 07:25 AM

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.

 

Comment

People who like this

0 Show 0 · Share
10 |2000000 characters needed characters left characters exceeded
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Toggle Comment visibility. Current Visibility: Viewable by all users

Up to 10 attachments (including images) can be used with a maximum of 50.0 MiB each and 250.0 MiB total.

avatar image

Answer by Dave M. · Sep 05, 2014 at 03:51 AM

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.

Comment

People who like this

0 Show 2 · Share
10 |2000000 characters needed characters left characters exceeded
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Toggle Comment visibility. Current Visibility: Viewable by all users

Up to 10 attachments (including images) can be used with a maximum of 50.0 MiB each and 250.0 MiB total.

avatar image Markus B. · Sep 05, 2014 at 06:14 AM 0
Share

Getting the start time can be done as follows:

  • generate a dashboard and add the "agent overview" dashlet on it
  • using the REST API, retrieve the dashboard in XML format
  • the XML will contain the agent start time, which equals the JVM start time

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.

avatar image Antoine M. Markus B. · Sep 05, 2014 at 07:36 AM 0
Share

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

How to get started

First steps in the forum
Read Community User Guide
Best practices of using forum

NAM 2019 SP5 is available


Check the RHEL support added in the latest NAM service pack.

Learn more

LIVE WEBINAR

"Performance Clinic - Monitoring as a Self Service with Dynatrace"


JANUARY 15, 3:00 PM GMT / 10:00 AM ET

Register here

Follow this Question

Answers Answers and Comments

4 People are following this question.

avatar image avatar image avatar image avatar image

Forum Tags

dotnet mobile monitoring load iis 6.5 kubernetes mainframe rest api dashboard framework 7.0 appmon 7 health monitoring adk log monitoring services auto-detection uem webserver test automation license web performance monitoring ios nam probe collector migration mq web services knowledge sharing reports window java hybris javascript appmon sensors good to know extensions search 6.3+ server documentation easytravel web dashboard kibana system profile purelytics docker splunk 6.1 process groups account 7.2 rest dynatrace saas spa guardian appmon administration production user actions postgresql upgrade oneagent measures security Dynatrace Managed transactionflow technologies diagnostics user session monitoring unique users continuous delivery sharing configuration alerting NGINX splitting business transaction client 6.3 installation database scheduler apache mobileapp RUM php dashlet azure purepath agent 7.1 appmonsaas messagebroker nodejs 6.2 android sensor performance warehouse
  • Forums
  • Public Forums
    • Community Connect
    • Dynatrace
      • Dynatrace Open Q&A
    • Application Monitoring & UEM
      • AppMon & UEM Open Q&A
    • Network Application Monitoring
      • NAM Open Q&A