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

Several questions about Apache HTTPD instrumentation


Q1: Is it possible to redefine a log file name in dtwsagent.ini? Ie java agent supports it. Could not find such option for dtwsagent here:

Q2: How to use -instance parameter of master dtwsagent? Ie

$ dynatrace/agent/lib64/dtwsagent -instance test
Usage: dtwsagent [options]

Available options:
-? Print this help message
-instance <name> Instance name

Q3: In our environment a single Apache HTTPD process can be configured to service multiple applications (using different vhosts). How can we connect different apps if only the master agent accepts only single Name option in its .ini file?

Apache HTTPD version:

/opt/webstack/apache2/2.4/bin/httpd -V
Server version: Apache/2.4.20 (Unix)
Server built: Jun 8 2016 12:18:21
Server's Module Magic Number: 20120211:57
Server loaded: APR 1.5.2, APR-UTIL 1.5.4
Compiled using: APR 1.5.2, APR-UTIL 1.5.4
Architecture: 64-bit
Server MPM: prefork
threaded: no
forked: yes (variable process count)
Server compiled with....
-D APR_HAVE_IPV6 (IPv4-mapped addresses enabled)
-D HTTPD_ROOT="/opt/webstack/apache2/2.4"
-D SUEXEC_BIN="/opt/webstack/apache2/2.4/bin/suexec"
-D DEFAULT_PIDLOG="/var/run/opt/webstack/apache2/2.4/"
-D DEFAULT_SCOREBOARD="logs/apache_runtime_status"
-D DEFAULT_ERRORLOG="logs/error_log"
-D AP_TYPES_CONFIG_FILE="/etc/opt/webstack/apache2/2.4/mime.types"
-D SERVER_CONFIG_FILE="/etc/opt/webstack/apache2/2.4/httpd.conf"

Dynatrace Pro
Dynatrace Pro

Q1 - if you look into the standard dtwsagent.ini file that is created when you install the agent you will find this entry that should do what you are looking for (just uncomment it and adjust it):

#LogfilePath /path/to/the/logfiles

Q2 - this is required if you run multiple Apache instances on the same server and want them to report to different AppMon servers. The documentation covers this quite extensively:

Q3 - each Apache instance is served by the same agent thus sending it's data to the same AppMon server and system profile. There is no configuration option to split this by vhost.

Q1: LogfilePath option says agent WHERE log files can be saved. Whereas I was asking for the option that says agent HOW to call a log file.

By default the log file contains a PID in its name which is very inconvenient when troubleshooting. java agent supports option logfile=<filename>


grep -v -e ^# -e ^$  dynatrace/agent/conf/dtwsagent.ini
Name Test-Apache
Server montest
Loglevel finest
LogfilePath /tmp
CompressInjectedResponse true
isMasterAgentServiceInstalled true
ls /tmp/dt*.log
/tmp/dt_dtwsagent_37470.0.log /tmp/dt_Test-Apache_bootstrap_37470.0.log