cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to DT_CUSTOM_PROP for Tomcat

y_buccellato
Helper

Hello based on this doc:

https://www.dynatrace.com/news/blog/define-process-group-properties-via-environment-variables-kubern...

I cannot understand how/where to insert the DT_CUSTOM_PROP on Tomcat runninx on linux System.

Do someone have already done this? Can you guide me to do so?

Thank you


7 REPLIES 7

Julius_Loman
Leader

If this is a standard tomcat and you are starting it with the catalina.sh startup script, just put it in the $CATALINA_HOME/bin/setenv.sh script (or create it).

Don't forget to export the variables, for example:

export DT_CLUSTER_ID=tomket1
export DT_NODE_ID=mynode1
export DT_CUSTOM_PROP=myprop=myvalue

Thank you this was the right solution for me, 9 points to gryffindor!


@Julius L. hello! I'm back here 🙂

I was wondering, do you have any knowledge on where can I do this in Apache Web Server?

Sure I do 🙂

However, it depends on your Apache Web Server distribution and how you start the apache process. Typically in Linux distributions, you will have to set it in the envvars file in your apache config directory or in the bin directory as they start it with the apachectl wrapper script.
If you start it directly by running the binary httpd, then you will have to do it in your script.

Hi Julius,

I'm investigating this for a vanilla installation of httpd Apache web server 🙂

As I wrote - it works even for vanilla installation. If you are starting it with apachectl, then you can put it into envvars file. If you are starting the httpd binary directly, then you will have to find a place where it fits you best.

Thank you very much!