Self monitor Applications Manager using Real User Monitoring

Self monitor Applications Manager using Real User Monitoring

We can monitor the Applications Manager using Real User Monitoring with a Java Script injection and this can be used to measure the Applications Manager's performance continuously. All you need is to install and setup the Real User Monitoring (RUM) Agent and configure it to map to the Applications Manager.
Note: Please note that one should create RUM monitor for each individual Applications Manager instance to be monitored. 
Ex: For an Enterprise edition with 1 Admin server and 10 Managed servers, a total of 11 RUM monitors should be added for each instance separately.

Setting up Real User Monitoring (RUM) Agent

Download and install the RUM Agent in a different server from the server where the Applications Manager is installed. You can install it in either Windows or Linux server.
Please find the detailed steps here.
By default RUM Agent runs in "http" and the port number is "8080".

Add Real User Monitor

Once the RUM agent is setup and mapped with the Applications Manager, then visit the Applications Manager UI and add a RUM monitor with the details of the Applications Manager instance you wish to monitor.
You can choose the different set of metrics that you wish to monitor and create the RUM monitor with the configuration you need. You can find the detailed steps to add the RUM monitor here.

JavaScript injection into Applications Manager

Once the monitor is added, you can find JavaScript code snippet generated and available in the Monitor details page under Copy Script tab. That script needs to injected into the Applications Manager you want to monitor. Kindly follow the steps below for the same.

      1. Copy the entire script code from the above mentioned tab.
      2. Remove the script tags present in the first and last line ("<script>" & "</script>")
      3. Replace <agentProtocol> with protocol in which the RUM agent is running (http or https).
      4. Replace the <agentHost> and <agentPort> with RUM agent's hostname and port number in which it is running.
Sample RUM Script copied from the Monitor details page:
<script type="text/javascript">
(function(w,d,s,r,k,h,m){
if(w.performance && w.performance.timing && w.performance.navigation) {
w[r] = w[r] || function(){(w[r].q = w[r].q || []).push(arguments)}
h=d.createElement('script');h.async=true;h.setAttribute('src',s+k);
d.getElementsByTagName('head')[0].appendChild(h);
(m = window.onerror),(window.onerror = function (b, c, d, f, g) {
m && m(b, c, d, f, g),g || (g = new Error(b)),(w[r].q = w[r].q || []).push(["captureException",g]);})
}
})(window,document,'agentprotocol://agenthost:agentport/RUMScript.js?appKey=','apmr','tfkiQsihBOQJQAbBiVndm6WcdBQfybhK10008596');
</script>

Sample RUM Script after making the mentioned changes:
(function(w,d,s,r,k,h,m){
if(w.performance && w.performance.timing && w.performance.navigation) {
w[r] = w[r] || function(){(w[r].q = w[r].q || []).push(arguments)}
h=d.createElement('script');h.async=true;h.setAttribute('src',s+k);
d.getElementsByTagName('head')[0].appendChild(h);
(m = window.onerror),(window.onerror = function (b, c, d, f, g) {
m && m(b, c, d, f, g),g || (g = new Error(b)),(w[r].q = w[r].q || []).push(["captureException",g]);})
}
      5. Open <APM_HOME>/working/template/appmanager.js file in any text editor.
            <APM_HOME> - Denotes the installation folder of the Applications Manager which you want to monitor.
      6. Paste the modified script on the top of the appmanager.js file and save the file.
            Example:
            
      7. Open a browser, clear the cache and access the Applications Manager in which the script is placed.
      8. You should be able to see the data after a while.

You can even monitor the precise Geographic location and the ISP details of the user who accesses your Applications Manager, then you can do it by following these steps.

      • Related Articles

      • Real User Monitor (RUM) - Troubleshooting

        If the monitor has not polled data for long time. Follow below steps for troubleshooting Check prerequisites to done : Real User Monitor requires RUM Agent to be installed and mapped to Applications Manager. Refer the help page to know how to setup ...
      • Self monitor Applications Manager using APM Insight Java Agent

        Applications Manager is built with Java, hence we can monitor it using APM Insight Java Agent to measure it's performance continuously, which can be very much useful. Setting up APM Insight Java Agent Follow the below steps to download and set up the ...
      • How to enable HTTPS connection between end user and RUM Agent?

        By default end user data will be collected and sent via HTTP connection to RUM Agent. To enable HTTPS connection you should have an valid SSL Certificate (keystore file basically), not a self signed certificate. Open the AppServer.properties file ...
      • Real User Monitoring Agent - Frequently asked questions

        How to change Applications Manager details in RUM Agent? Open the AppServer.properties file located under <RUMAgent_Home>/conf/ directory in any text editor. Update Applications Manager hostname in apm.host key. Update Applications Manager SSL Port ...
      • How to get ISP data in Real User Monitor?

        By default, Real User Monitor does not show ISP data of end user. To get ISP data, you can make use of any third-party Geolocation API. Currently, RUM supports only APIs that return the response in JSON format. When you have purchased any Geolocation ...