On-Premises Website and Mobile App Monitoring

Monitoring Endpoint

The Instana On-Premises backend host accepts data serves the website monitoring JavaScript agent under port 2999. Assuming that the machine running the On-Premises backend has a hostname of instana-backend, you can use the following paths.

  • The minified JavaScript agent: http://instana-backend:2999/eum.min.js
  • The reporting URL for the JavaScript agent (website monitoring): http://instana-backend:2999/
  • The reporting URL for the iOS and Android agents (mobile app monitoring): http://instana-backend:2999/mobile

Your end-users’ web browsers and mobile app will retrieve/report data from one of these paths.

Proxying the Monitoring Endpoint

By proxying the endpoint, you are able to customize how the endpoint is available for your end-users. You can configure TLS certificates, hostnames, ports, and load balancers and much more by doing so. Below are some short examples (you’ll only need one of those) on how you can proxy the monitoring endpoint using common web server software:

With NGINX

Please note the required trailing slashes in the location block and the proxy_pass instruction.

upstream eumacceptor {
  server instana-backend:2999;
  keepalive 6;
}

server {
  listen 443 ssl;

  location /eum/ {
    proxy_pass http://eumacceptor/;
    proxy_set_header X-Real-IP $remote_addr;
  }
}

With Apache Httpd

Please note the required trailing slashes in the proxy_pass instruction.

<VirtualHost *:*>
    ProxyPreserveHost On

    ProxyPass /eum/ http://instana-backend:2999/

    ServerName your-domain.io
</VirtualHost>

Analyzing Issues

To analyze issue, do the following:

  1. Open the URL to the JavaScript agent manually in the browser. Do you get JavaScript as a response by the server?

    • If this is failing, and you are using a proxy, keep in mind that the path to the JavaScript file probably changed. With our example proxy configs above, the path would be /eum/eum.min.js. Did you take the trailing slashes into account, i.e. does your proxy strip the /eum path?
    • If this is failing, and you aren’t using a proxy, keep in mind that the Instana monitoring endpoint only binds to port 2999.
    • Still not working? Contact support and explain the setup, send the proxy config, and explain how you are trying to access the script.
  2. Add the website monitoring snippet to your application.

    • If you aren’t seeing any website data, use the website debug script. Instead of accessing eum.min.js, use eum.debug.js. This will log a bunch of information about configuration and transmission to the browser console. Inspect the console and resolve any further issues.
    • Open the network explorer in your browser (found in the dev tools). You should be able to see outgoing HTTP GET and HTTP POST calls against the configured reporting URL. Make sure that these calls return a status code 200 or 204. Especially make sure that no HTTP redirects (status code 302) is returned by the proxy as a result of this call.
    • Still not working? Contact support and explain the setup, send the proxy config, and explain how you are trying to access the script, as well as the output of the debug script.