Download the Agent
- From the left navigation menu, select Configuration > Instrumentation > End User Monitoring.
Click Save to File to save it.
- Place it somewhere accessible to the Apache instance. The name of the saved file should be "adrum.js".
The basic set-up takes four steps:
- Make Sure the Modules are Loaded
- Create an Adrum Configuration File
- Add the Location of the Adrum Configuration File to httpd.conf
- Restart the Web Server
Make Sure the Modules are Loaded
Check your global Apache
httpd.conf file and make sure that the following two
LoadModule commands are in the file:
Create an Adrum Configuration File
Create a file named
adrum.conf with contents similar to the example below, based on your Apache version. ( See this Stack Overflow post for details.) In this case, the substitution rule covers the location of the entire site (
Location /) but you can also recursively select a specific directory and its subdirectories by using
Sample adrum.conf Apache 2.2
Sample adrum.conf Apache 2.4
/adrum.js is the path to a copy of the adrum file that is accessible to the server. The flags after the
i -matching is case-insensitive
n -pattern is treated as a fixed string (removing the
nmeans the pattern is treated as a regular expression)
q -module does not flatten the buckets after each substitution - this can speed performance.
For more information, see the Apache module docs here.
<head> tag has an attribute like
<head lang="en">, you can use a regex in the substitution string and omit the
n flag. For example:
Note the timer initialization:
<script>window['adrum-start-time'] = new Date().getTime();</script>. Injecting these scripts as close as possible to the top of the document, preferably right after the <head> tag, ensures the best possible timings.
If you use
<meta> tags, you should place them right after your
<meta> tag. This can avoid issues with some versions of IE.
(Optional) Adjust for gzipped resources
If your page is compressed, the substitution won't work unless the content is INFLATEd, the substitution is made, and then the content is DEFLATEd. There are multiple ways to do this. For example, in the FilterProvider line:
See this Stack Overflow post for more information. If you are using Apache as a proxy, you can also instruct it not to accept gzip-encoded content.
Add the Location of the Adrum Configuration File to httpd.conf
Add the following line to your global Apache
Alternatively you can add the directives to the
httpd.conf file directly instead of creating a separate adrum file.
Restart the Web Server
To pick up the new configuration, restart:
If you get a warning "Useless use of AllowOverride in line 2 of [absolutePathTo]/adrum.conf", it can be ignored. It simply means the AllowOverride is redundant. You can remove it if you wish.
If you are setting up your automatic injection using an Apache instance that is configured as a reverse proxy, you must use the Location directive based method described above, with the
ProxyPassReverse directives also in the Location directive. If you are using an Apache instance that is your primary web container you have two additional options for describing the actual substitution step:
Use the Directory Directive
You can use the Directory directive instead of the Location directive.
Add lines similar to this to an
.htaccess file in the base document directory for your site, replacing your filter name for
<MyFilter>. If you don't have an
.htaccess file, create one:
/adrum.js is the path to a copy of the adrum file that is accessible to the server. Make sure
.htaccess is world-readable.