• 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 Ryan C. · Feb 29, 2012 at 10:54 PM · continuous delivery

Options for REST reporting

I am playing around with the REST interface for HTML reporting.

  • Is there a trick for passing the DT userid & password as parameters in the REST URL to avoid the authentication prompt?
  • Are there any filters that can be used to strip down the resulting HTML so that I see the image(s) (such as my chart) and none of the other stuff such as the dashboard title & header?
  • Is there any way to control the size of the dashlet image (make my chart smaller)?

I realize that to get fancy like this, I should probably use REST to get the data as XML and then use some charting tool or something to refine the presentation of the resulting HTML. But before I go down this path, I'm just checking to see if there are any undocumented tricks/hacks that I could exploit to do something quick & dirty.

Thanks.

Comment
HIMANSHU m.
Chad T.

People who like this

2 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.

7 Replies

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

Answer by Dominik S. · Mar 05, 2012 at 04:26 PM

Hi,

ad. Username/Password: I have used the wget-tool in scripts, it allows to set username/password via commandline options when doing the REST request.

ad. Stripped down version: Klaus Enzenhofer is currently working on a demo-report-format for Mobile Phones, maybe this is suitable for what you would like to do here?

ad. Size of images: These are currently hardcoded.

ad. Dashboard Icon:
the Dashboard Icon is used for the Production Lite edition where have a different Start Center that shows each Dashboard via these Icons.

If you want to use them for other things, you can set it for a Dashboard in "Client Debug-Mode" via CTRL-SHIFT-F9 and then open the Dashboard Properties, there are "Set Dashboard Icon" and "Remove Dashboard Icon" buttons available.

Dominik.

Comment
HIMANSHU m.
Chad T.

People who like this

2 Show 1 · 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 Graeme W. · Mar 05, 2012 at 09:53 PM 2
Share

I don't know if this addresses your particular user / password question, but you can always put the user and password inline in the URL:

     wget -O - http://admin:admin@localhost:8020/rest/html/management/profiles/easyTravel

-- Graeme

avatar image

Answer by Ryan C. · Mar 02, 2012 at 09:36 PM

Thanks Andreas. I didn't know that existed. I'll take a look at it. In the meantime, I built my own little tool (see attached).Show Your Dashlet as an HTML Image.pdf

Comment
HIMANSHU m.
Chad T.

People who like this

2 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. · Mar 02, 2012 at 02:25 PM

You should also look into our Automation Library: Automation Library (Ant, Maven) for Dynatrace. It provides an easy way to call these REST Services and takes care of the Authentication.

Andi

Comment
HIMANSHU m.
Chad T.

People who like this

2 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 Ryan C. · Mar 01, 2012 at 05:34 AM

Thanks Rob. The code samples in that article will definitely come in handy.

Do you know anything about the "dashboard icon" feature I mentioned in my previous post?

Comment
HIMANSHU m.
Chad T.

People who like this

2 Show 1 · 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 Rob V. · Mar 01, 2012 at 06:44 AM 2
Share

Well, I've never used it and am not sure how to set it "nicely", but dashboards do have (in their XML) an icon property. This rest call should return that if it exists.

<dashboardconfig memento.version="4.1.0.2898" icon="com.dynatrace.diagnostics.sdk/default.gif" localizationenabled="false" sessiontype="live" locationassource="false" groupname="" authorname="admin" opendrilldowninnewdashboard="false" sessionid="easyTravel" bgcolor="255,255,255,255" modified="2011-12-29T15:23:17-0500" id="522d1b93-780f-4e45-b8d0-958d6e21709f" revision="00000134-8b7d-b1a5-854a-afd44b134e5c" source="server://rvollum" created="2011-12-29T15:20:11-0500" description="" name="easyTravel Analysis" modifiedbyname="admin" locationascomparesource="false">

avatar image

Answer by Rob V. · Mar 01, 2012 at 02:34 AM

Hi Ryan,

Regarding userid/password in the REST interface: no, sorry, there's no support for that. You could write your own code that invoked the REST interface some other way than the browser, but that's admittedly a chore.

Perhaps this blog posting will help with what you need, assuming it's worth the effort:

http://blog.dynatrace.com/2009/08/24/lessons-learned-from-getting-net-to-rest-with-java/

And on all the fancy filtering: I think your best bet is to pull the XML as you suggest. You do have some flexibility looking at the Reporting tab of the dashboard properties, but not a ton.

Rob

Comment
HIMANSHU m.
Chad T.

People who like this

2 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 Ryan C. · Mar 01, 2012 at 01:28 AM

(I am having a conversation with myself)...

Can someone elaborate on the "dashboard icon" concept? None of my dashboards have an icon attribute. 

 In specific cases a dashboard references an icon that can be requested with the link of the icon attribute.

Dashboard Icon

Some preconfigured dashboards are referencing an icon of the type PNG, GIF or JPEG. With the following request you can download the icon of a specified dashboard:

Request type

HTTP GET

URI

http://dtservername:8020/rest/management/dashboards/<DASHBOARDNAME>/icon

Comment
HIMANSHU m.
Chad T.

People who like this

2 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 Ryan C. · Feb 29, 2012 at 11:13 PM

Is there a way to directly invoke the "images" handler on the REST interface to return the image file of a specific dashboard/dashlet? /rest/management/reports/images

Comment
HIMANSHU m.
Chad T.

People who like this

2 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.

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

3 People are following this question.

avatar image avatar image avatar image

Related Questions

java.lang.IllegalArgumentException: No enum const class com.dynatrace.jenkins.dashboard.model.TestCaseStatus.INVALIDATED

LoadRunner tests not showing up on teh test automation dashlet in 4.2

JUnit Runtime Error

Generating test performance reports in Jenkins from jenkins pipeline file

I am interested in exporting AppMon metrics in Excel for some offline analysis. Can this be done through via an API ?

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