I am playing around with the REST interface for HTML reporting.
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.
Answer by Dominik S. ·
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.
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
Answer by Ryan C. ·
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
Answer by Andreas G. ·
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
Answer by Ryan C. ·
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?
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">
Answer by Rob V. ·
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
Answer by Ryan C. ·
(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.
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 |
Answer by Ryan C. ·
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
JANUARY 15, 3:00 PM GMT / 10:00 AM ET