Map Virtual Hosts to Splunk AppDynamics Tiers
By configuring virtual hosts, Apache Web Server administrators can have a single Apache Web Server instance act as the entry point for what appears to be different websites from the end user's perspective.
In the Cisco AppDynamicsapplication model, it will usually make sense to represent each virtual host configured in an Apache Web Server as its own tier. This tends to better represent the logical model of the environment and reduces the likelihood of quickly exhausting tier business transaction limits for an Apache Web Server that proxies a large application environment.
To associate different virtual hosts with different tiers, add the AppDynamicsApplicationContext directive to the virtual host configuration, supplying the application, tier and node name as arguments, as follows:
AppDynamicsApplicationContext <application> <tier> <node>
For example:
Listen 80
<VirtualHost *:80>
DocumentRoot "/www/example1"
ServerName site1.example.com
...
AppDynamicsApplicationContext MyApp site1.example.com:80 node01
</VirtualHost>
<VirtualHost *:80>
DocumentRoot "/www/example2"
ServerName site2.example.org
...
AppDynamicsApplicationContext MyApp site2.example.org:80 node01
</VirtualHost>
In the example above, the tier name is a combination of the virtual machine ServerName and port number. You are not required to include the ServerName and port number in the tier name, but they can be useful for identifying which virtual machines are creating business transactions. We recommend using a tier name that best represents the purpose of the virtual machine.
The Apache Web Server Agent associates incoming requests to the Cisco AppDynamicscontext based upon the virtual host server and port in the request.
Note that instead of using virtual hosts to multi-host from Apache, an administrator
may run multiple instances of the Apache Web Server with a distinct
httpd.conf
file (on Ubuntu and Debian, this file is called
apache2.conf
) for each instance. In this case, you would
instrument the Apache Web Server by creating an agent configuration file for each
instance, and include each configuration file in the httpd.conf
file of the corresponding instance. See Configure the Apache Agent.