Answer by Dominik S. ·
Hi,
I did not actually try it, but it should work to debug a plugin in a running Dynatrace Collector.
You would set the remote-debugging options in the dtcollector.ini, e.g. something like
-Xdebug
-Xrunjdwp:transport=dt_socket,address=8001,server=y,suspend=n
And then use remote debugging in Eclipse to connect to it and stop on breakpoints inside the plugin code.
Naturally the current plugin needs to be deployed to the Dynatrace installation first.
However I usually try to test as much as possible via unit-tests as that allows a much quicker turnaround compared to a full deploy/debug roundtrip.
Dominik.
Answer by Mohammed S. ·
Hi,
I had a requirement to add an additional varbind in to SNMP Action plugin.
com.dynatrace.diagnostics.plugins.snmp.mapping.IncidentInfoMapper.
I have created an eclipse Java project and added the source files for the Dynatrace SNMP Pluging. Added the dependent jar files and added the necessary code for additional varbind. I am able to run the application successfully. Then I created the jar file using File–>Export to Jar.
When I am trying to deploy this as a plug-in, I am getting "The bundle 'TestPlugin.jar' is invalid".
Can any one of you have any idea what could be the problem in this plugin jar file. Anything to do with signjar ?
Thanks a lot in advance.
Thousif
Just cross linking to the same question you posted in a new question: Adding a varbind in SNMP Action plugin
Answer by Luis R. ·
Hi Rick,
You can only debug plugins by using status messages or log files.
Check this out: https://community.dynatrace.com/community/display/DOCDT62/Best+Practices+and+Examples#BestPracticesandExamples-DebuggingaPlugin
Luis Redda
JANUARY 15, 3:00 PM GMT / 10:00 AM ET