Answer by Sathish S. ·
Let me know if you want to open ticket with support team if it requires futher investigation. Thanks
Answer by Sathish S. ·
Further information on this.
I downloaded automation library from below site for dynatrace 5.6 version.
https://community.compuwareapm.com/community/display/DL/Automation+Library+for+dynaTrace
I was browsing through clases inside that jar, i found "com.dynatrace.diagnostics.automation.Console" class is not present.
This is same I'm getting by executing below command
java -cp com.dynatrace.diagnostics.automation_5.6.0.5713.jar com.dynatrace.diagnostics.automation.Console
Error: Could not find or load main class com.dynatrace.diagnostics.automation.Console
Is it something broken ?
Answer by Sathish S. ·
I'm not sure how to find version of that library. But i pasted manifest file of automation library jar file.
Manifest-Version: 1.0
Ant-Version: Apache Ant 1.7.1
Created-By: 1.5.0_10-b03 (Sun Microsystems Inc.)
Main-Class: com.dynatrace.diagnostics.automation.Console
Bundle-ManifestVersion: 2
Bundle-Name: dynaTrace Automation
Bundle-SymbolicName: com.dynatrace.diagnostics.automation;singleton:=t
rue
Bundle-Version: 1.0.0
Bundle-ClassPath: .,lib/ant.jar,lib/doxia-site-renderer-1.0-alpha-11.j
ar,lib/maven-2.2.1-uber.jar,lib/maven-reporting-impl-2.0.4.1.jar
Bundle-Vendor: dynaTrace software GmbH
Export-Package: com.dynatrace.diagnostics.automation.ant,com.dynatrace
.diagnostics.automation.maven,org.apache.maven.plugin
Require-Bundle: com.dynatrace.diagnostics.automation.rest.sdk;bundle-v
ersion="1.0.0"
Answer by Sathish S. ·
Thanks Andi, Yes i know that RESTAPI but i was trying using "com.dynatrace.diagnostics.automation.jar " API to get agents information.
Answer by Andreas G. ·
Hi
Thanks for letting us know about this. If you want to access the REST INterface - have you ever tried to access it directly instead via the command line options of our automation library? To get the agent information we have the following REST interfaces: Agents and Collectors (REST) - example: http://<server>:8020/rest/management/agents
Andi
Answer by Sathish S. ·
Trying to connect DT using restfull service, getting below exception.
Any idea about this exception ?
java -cp com.dynatrace.diagnostics.automation.jar com.dynatrace.diagnostics.automation.Console -user <User name> -pass <password>
-server "server ulrl" -agentinfo
Jul 20, 2014 11:26:47 AM com.dynatrace.diagnostics.automation.Console loadProperties
WARNING: Unable to load properties - using defaults.
Exception in thread "main" com.dynatrace.diagnostics.automation.rest.sdk.Command
ExecutionException: Error listing agents: For input string: "b4f01794"
at com.dynatrace.diagnostics.automation.rest.sdk.RESTEndpoint.getAgents(
RESTEndpoint.java:386)
at com.dynatrace.diagnostics.automation.Console.main(Console.java:219)
Caused by: java.lang.NumberFormatException: For input string: "b4f01794"
at java.lang.NumberFormatException.forInputString(NumberFormatException.
java:65)
at java.lang.Integer.parseInt(Integer.java:492)
at java.lang.Integer.valueOf(Integer.java:582)
at com.dynatrace.diagnostics.automation.rest.sdk.entity.Agent.setValue(A
gent.java:12)
at com.dynatrace.diagnostics.automation.rest.sdk.AgentXMLHandler.charact
ers(AgentXMLHandler.java:65)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.characte
rs(AbstractSAXParser.java:546)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImp
l.scanDocument(XMLDocumentFragmentScannerImpl.java:463)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(X
ML11Configuration.java:848)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(X
ML11Configuration.java:777)
at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.
java:141)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Ab
stractSAXParser.java:1213)
at com.dynatrace.diagnostics.automation.rest.sdk.RESTEndpoint.getAgentHa
ndler(RESTEndpoint.java:180)
at com.dynatrace.diagnostics.automation.rest.sdk.RESTEndpoint.getAgents(
RESTEndpoint.java:383)
... 1 more
JANUARY 15, 3:00 PM GMT / 10:00 AM ET