Apache Agent configuration

This page also applies to the IBM HTTP Server (IHS), which is based on the Apache HTTP server.

Architecture

The Apache Agent is provided as a module for the Apache HTTP server (dtagent.dll on Windows, libdtagent.so on Linux or Unix), in <DT_HOME>/agent/lib[64] with configuration in <DT_HOME>/agent/conf/dtwsagent.ini.

The Apache Agent doesn't communicate with the Collector directly, but through the Web Server Master Agent.

The *NIX Web Server Master Agent should be separately started as a daemon (at system startup).

On Windows, the Web Server Master Agent must be running as a service when the Apache Agent is loaded.

For an overview of the AppMon Web Server Master Agent technology, see Web Server Master Agent Configuration.

Configuring Apache

Note

It is not necessary to upgrade the AppMon Agent libraries for the Web Server Agent or choose the correct Apache Agent variants. The Bootstrap Agent takes care of checking for the correct AppMon Agent library when your application starts.

Add the following line to your Apache configuration file httpd.conf for XAMPP, located in <XAMPP_home>/ or in /opt/lampp/<etc>.

LoadModule dtagent_module "<DT_HOME>/agent/lib[64]/<dynaTraceAgentModule>"

It is recommended that you put the line at the end of httpd.conf, or at least add it as the last LoadModule.

For Apache2 installations that do not use a httpd.conf file, you must create a new module for the agent and then enable it:

  1. In the apache2/mods-available directory, create a new dtagent_module.load file that contains the following content:
    LoadModule dtagent_module "<DT_HOME>/agent/lib[64]/<dynaTraceAgentModule>"
    Substitute your values for the home directory and module file name.
  2. Enable the new agent module using the a2enmod command. For example, on *NIX systems:
    sudo a2enmod dtagent_module
    Once enabled, the agent module loads the next time you restart Apache.

Configuring an Apache node name

You can configure an Apache node name. This name shows in the Agent overview as part of the Agent name (for example: dtwsagent[Apache 2.2-My Apache Node Name]@myhost:8276). When starting multiple Apache instances on one host, you can use that node name to distinguish between those instances in the Agent overview. To configure the Apache Node Name, add the following line to the httpd.conf:

ApacheNodeName "My Apache Node Name"

Add this line somewhere after the LoadModule dtagent_module line.

Note

The Apache Node Name can not be used for mapping the agent into a System Profile

Agent injection copy/paste examples

64-bit full AppMon default installation with 64-bit Apache HTTP server on 64-bit Windows:
LoadModule dtagent_module "C:\Program Files\dynaTrace\dynaTrace 7.2\agent\lib64\dtagent.dll"

64-bit Agent-only default installation with 64-bit Apache on 64-bit Windows:
LoadModule dtagent_module "C:\Program Files\dynaTrace\dynaTrace Agent 7.2\agent\lib64\dtagent.dll"

Deployment and file access permissions

Usually the file access permissions of the files distributed with the AppMon Web Server Master Agent are automatically set by the installer shell script or MSI. If it is necessary to manually copy installation files, for example to automatically deploy a new version, make sure to retain file access permissions or that the Apache worker processes have the necessary permissions to access the files. The following is a list of files and the necessary permissions.

Windows

Path Description Access permissions required by Apache worker processes Default Permissions
agent\conf\dynaTraceWebServerSharedMemory Classic Agent only

The backing shared memory file used for communication between the Apache Agent and the Web Server Master Agent.
read/write Everyone: full control
agent\conf\dtwsagent.ini Agent configuration file. read Users: read and execute
agent\lib[64]\dtagent.dll Agent modules. read Users: read and execute
agent\downloads Downloaded Agent modules. read/write Everyone: modify and write