Manually setting up end-user monitoring
As an application specialist, you can set up monitoring of end-user data from any kind of HTML pages by manually inserting a JavaScript stub in your applications. You might want to use this option for one of the following reasons:
- You want to collect end-user data from an application that is manually created in the TrueSight console.
- You want to collect data from application pages with any web technology, including technologies that App Visibility agents do not support, such as static pages, PHP, or Node.js. See App Visibility requirements for JavaScript injection for support information.
- You do not want to use the automatic JavaScript injection feature. For information, see Disabling-end-user-monitoring-in-App-Visibility.
When you manually set up end-user monitoring, you can collect data such as the number of users, end-to-end transaction time, and errors. For more information about collected end-user data, see Analyzing-user-transaction-details.
The topic presents the following:
Before you begin
All components of the App Visibility server—the portal, collector, and proxy—must be installed.
Consult with your system administrator to obtain the following information:
- Host name or IP address of the App Visibility proxy. You need the host name or IP address of the computer where the App Visibility proxy is installed.
If the App Visibility proxy is behind a load balancing server and not receiving connections directly from end user browsers, ensure that you use the value of the App Visibility proxy callback.address property for the apm_proxy_host value. The property value must be the host name or IP address of the load balancing server. - Listening ports of the App Visibility proxy. You need the HTTP and HTTPS beacon receiver port numbers.
To open and prepare the JavaScript from the TrueSight console
Use this method if your application is already in the TrueSight console as a manual application. If your application is not yet in the console, see To open and prepare the JavaScript from the App Visibility proxy.
- Open the JavaScript stub file:
- From the TrueSight console, perform the following steps:
- Select Configuration > Applications.
- Click the name of the application to which you want to add the JavaScript.
- Click the action menu (vertical three dots) next to the application name, and then select Download End-User Monitoring Script. A JavaScript file is downloaded.
- From the TrueSight console, perform the following steps:
Open the file in a text editor.
The file contains the following script:
The appId value is unique to the specific application.
The following values are automatically replaced with values from the App Visibility proxy. You can change the values if you want to connect to a different proxy.- apm_proxy_http_port is the port number of the HTTP beacon receiver (default value is 880).
- apm_proxy_host is the host name or IP address of the App Visibility proxy.
- apm_proxy_https_port is the port number of the HTTPS beacon receiver (default value is 8444).
If you replace the values, ensure that you replace them in the last line of the script, as part of the source (src) value, using either the apm_proxy_https_port or the apm_proxy_http_port, depending on your system.
To add the JavaScript stub to your application, see To manually insert the JavaScript, below.
To open and prepare the JavaScript from the App Visibility proxy
Use this method if your application is not yet in the TrueSight console.
Open the JavaScript stub file in one of the following ways:
- In a browser window, navigate to http://apm_proxy_host:apm_proxy_port/static-resources/aeuem-stub.txt .
Replace the following placeholders:- apm_proxy_host is the host name or IP address of the App Visibility proxy.
- apm_proxy_port is the port number of the HTTP or HTTPS (depending on your system) beacon receiver.
The default values are 880 for HTTP, or 8444 for HTTPS.
- Open the file from the App Visibility proxy computer at proxyInstallationDirectory \apm-proxy\webapps\static-resources\aeuem-stub.txt.
A file with the following script opens:
- In a browser window, navigate to http://apm_proxy_host:apm_proxy_port/static-resources/aeuem-stub.txt .
- Copy the contents of the file to a text editor.
- (Optional) Replace the application_name placeholder with a meaningful, unique application name, and remove the comment indicators (//).
If you do not provide a value for application_name in the stub, a value is assigned through application discovery rules. - (Optional) Replace the entrypoint_name placeholder with a meaningful entry point name, and remove the comment indicators (//).
If you do not provide a value for entrypoint_name in the stub, the user transaction name is automatically assigned. - Replace the following values with values from the App Visibility proxy:
- apm_proxy_http_port is the port number of the HTTP beacon receiver (default value is 880).
- apm_proxy_host is the host name or IP address of the App Visibility proxy.
- apm_proxy_https_port is the port number of the HTTPS beacon receiver (default value is 8444).
- In the last line of the script, as part of the source (src) value, replace the value of apm_proxy_host with value from the App Visibility proxy, and the value of either the apm_proxy_https_port or the apm_proxy_http_port , depending on your system.
To add the JavaScript stub to your application, see To manually insert the JavaScript, below.
To manually insert the JavaScript
- In your application's HTML page, copy the content of the stub script and paste it in the <head> element:
- If the <head> element contains a <script> element, insert the stub before the first <script> element.
- If the <head> element does not contain a <script> element, insert the stub at the end of the <head> element, before the closing </head> tag.
Save the page.
Ensure that the script appears in you application's web pages.
Where to go from here
After you complete the manual set up for end-user monitoring, perform the following configuration tasks:
- Configure application discovery
- Configuring-event-thresholds-SLAs-for-automatically-discovered-applications
(Infrastructure Management) You can edit an application model for an application with a manually inserted JavaScript stub. Edit the application in the same way you would other manually created application models.
After configuration is complete, you can analyze end-user experience with the User tier.
Related topics
Setting-up-applications-for-monitoring