08 Apr 2019 12:33 PM
Hello All,
Could you please let me know the steps to be followed to detect java process on solaris(SPARC) machine. Apache is the only process visible on the oneagent tenant.
We have added below code in apachectl script and it started detecting apache. The sameway is there any process to add the code to detect java as well?
DT_HOME=/opt/dynatrace/oneagent
export DT_HOME
LD_PRELOAD_64=$DT_HOME/agent/lib64/liboneagentproc.so
export LD_PRELOAD_64
LD_PRELOAD=$DT_HOME/agent/lib/liboneagentproc.so
export LD_PRELOAD
Appreciate your help.
Thanks,
Prathyusha
08 Apr 2019 01:14 PM
Hello @Chakravarthula P.
You can set up OneAgent to monitor every application in your current application context. To do this, add the following code in your script or shell. Ensure that they are executed prior the application you want to monitor. You should not do this system-wide or for login users.
DT_HOME=/opt/dynatrace/oneagent
export DT_HOME
LD_PRELOAD_64=$DT_HOME/agent/lib64/liboneagentproc.so
export LD_PRELOAD_64
LD_PRELOAD=$DT_HOME/agent/lib/liboneagentproc.so
export LD_PRELOAD
Please have a look on the below link for monitoring every Java and Apache HTTP service in your execution context.
Regards,
Babar
09 May 2019 11:58 AM
Hello Babar,
Thanks for the comment.
We tried adding the code in java startup script and restarted the JVM with no luck:(
Could you please suggest whatelse can be done or checked?
Regards,
Prathyusha
15 Jan 2021 04:38 AM
Does the LD_PRELOAD environment explicitly need to be set for OneAgent to be able to monitor a Java application? Specifically, I'm running a Spring boot application within docker. Does the docker environment variable LD_PRELOAD explicitly need to be set?
I could not find any reference in the official documentation that requires this to be set explicitly.
Thanks
15 Jan 2021 10:49 AM
Hello @Keith L.
I am not sure about the docker because I did not get a chance to work on that, but for the Java process monitoring, it is mandatory to set variable LD_PRELOAD .
Regards,
Babar
09 May 2019 12:03 PM
Also, can you let us know the java startup script name(same like how we inserted the code in "apachectl" script) where we can insert the code?