Injecting JavaScript by using F5 iRule
If you have the F5 server, you can use F5 iRules to automatically inject the TrueSight App Visibility Manager End User Monitoring JavaScript to the application pages. The iRule injects the JavaScript stub to html content-type pages that are requested from the F5 virtual server.
This section provides information about injecting the TrueSight App Visibility ManagerEnd User Monitoring JavaScript by using the F5 irule and configuring the iRule.
Prerequisites
- A stream profile must be enabled on your virtual server.
- All your pages must have the <head> or <HEAD> tag. The JavaSript is not injected to pages that do not have the <head> or <HEAD> tag.
- The request and response content must not be encrypted when the iRule accesses the content. The JavaScript is not injected to encrypted pages.
- The content must be uncompressed, and the pages must not be chunked for the stream searches to work. If the content is compressed, do the following:
- Uncomment the commented code block at the end of the
HTTP_REQUEST
to remove the header from the request and to ensure that the server does not send a compressed response. - In your HTTP profile, set the value of the
Response Chunking
parameter toRechunk
.
- Uncomment the commented code block at the end of the
Inject JavaScript by using the F5 iRule
Do the following:
If you have enabled JavaScript injection from the App Visibility Agent, disable it to prevent duplicate injection.
Create the iRule.
Apply the iRule to your virtual server.
Configure the iRule
Do the following to configure the iRule that you created:
- Configure the App Visibility host and ports as part of the the
bmc_eum_stub
variable. Set the following fields:<proxy-http-port>
,<proxy-https-port>
,<proxy-host>.
If the App Visibility Proxy is hosted behind a load balancer, use the host and port of the load balancer entry for the proxy. - (Optional) Configure the pages to which the iRule injects the JavaScript stub. You can use
PAGES_TO_INJECT_LIST
that is defined in theRULE_INIT
section. By default, the iRule injects the JavaScript to all pages. Use the following tokens to define your rules:contains
,ends_with
,starts_with
, oreq
Was this page helpful? Yes No
Submitting...
Thank you
Comments