AppDynamics Application Intelligence Platform

3.8.x Documentation

PDFs

Videos

Release Notes

Skip to end of metadata
Go to start of metadata

By default, end-users' locations are resolved using public geographic databases. You can host an alternate geo server for your countries, regions, and cities instead of using the default geo server hosted by AppDynamics.

Some customers prefer to host their own geo server because:

    • they have intranet applications where the public IP address does not provide meaningful location information but the user's private IP does.
    • they have a hybrid application where some users access the application from a private location and some access it from a public one. If a user doesn't come from a specific private IP range mapped by the custom geo server, the system can be set to default to the public geo server.

To host a custom geo server:

1. Download the Geo Server File
2. Configure the Geo Server location
3. Create the IP Mapping File
4. Set Properties in web.xml

Download the Geo Server File

Download the GeoServer-2.0.zip file from AppDynamics at

http://download.appdynamics.com/onpremise/public/latest/GeoServer.zip

This compressed file contains:

  • a geo.war file
  • local-map.xml file

Deploy the geo.war in a separate Tomcat/Jetty web container. Do not deploy the geo.war file in the same container as the controller.

Configure the Geo Server Location

Enter the URL, including the context root, of your hosted geo server in the Geo Server URL field in the configuration screen. In the following configuration the context root is "/geo".

(warning) If you are using manual injection for your JavaScript agent, you must make sure that the copy of the script that you use is one that you have downloaded after this URL is set.

Create the IP Mapping File

The local-map.xml IP mapping file specifies the locations for which EUM provides geographic data. It maps IP addresses to geographic locations.

Edit the local-map.xml, which was downloaded with the geo.war file, for your environment. This file contains a <location> element for every location to be monitored. The file has the following format.

<config>
    <location network="239.0.64.0" subnet-mask="255.255.192.0">
         <country>United States of America</country>
         <region>California</region>
         <city>Mountain View</city>
     </location>
     ... more location entries
</config>

The <country>, <region>, and <city> elements are required. If the values of <country> and <region> do not correspond to an actual geographic location already defined in the geographic database, map support is not available for the location in the EUM map panel, but EUM metrics are displayed for the location in the grid view of the geographic distribution, end user response time panel, trend graphs, browser distribution panel, and in the Metric Browser. The <city> element can be a string that represents the static location of the end-user. You will notice that at least one of the location elements has the is-default=true attribute set. If there is an IP address that is not covered by your IP mapping file this is the value that is used. To use a public geo-server for non-covered IP addresses, see Using a Hybrid Custom-Public Geo Server Setup.

This data is visible in browser snapshots and can be used to filter browser snapshots and to filter browser snapshots for specific locations:

The valid names for country and region are those used in the map in the geo dashboard. You can hover over a region in the dashboard to see the exact name (including spelling and case) of the region. See The Web EUM Geo Dashboard View.

Using a Hybrid Custom-Public Geo Server Setup

If you want EUM to evaluate any non-mapped IP address using the public geo-server, remove any location elements with the is-default=true attribute set.  In this case locating any non-mapped IP address is done in the EUM cloud, not locally.  

Set Properties in web.xml

In the web.xml file, set the ip.mapping.config property to the path of the IP mapping file. The web.xml file is in the geo.war file.
You can also set the log directory for the geo server and the number of seconds that geo data should be cached,

Add the mapping information as follows:

       <init-param>
            <param-name>logs.dir</param-name>
            <param-value>/opt/geo/logs</param-value>
        </init-param>
        <init-param>
            <param-name>ip.mapping.config</param-name>
            <param-value>/opt/geo/local-map.xml</param-value>
        </init-param>
        <init-param>
            <param-name>response.cache.seconds</param-name>
            <!-- Default is 1 day. Caching geo info longer than that is bad for mobile devices. -->
            <param-value>86400</param-value>
        </init-param>

This example assumes that you are using a modified local-map.xml file. If you created a new mapping file instead, use the name of that file in the <param-value> element instead of "local-map.xml" for the ip.mapping.config property.

Deploy a Custom Geo Server on Windows

If you are deploying your custom geo server on Windows, use the following additional instructions.

1. Unzip the geo.zip file you downloaded in Download the Geo Server File to D:\Appdynamics.
2. Copy D:\Appdynamics\geo\local-map-template.xml to D:\Appdynamics\geo\local-map.xml.
3. Edit the local-map.xml file as described in Create the IP Mapping File above.
4. Copy D:\Appdynamics\geo\geo.war to D:\apache-tomcat\webapps.
5. Restart the Tomcat server.
6. Stop the Tomcat server.
7. Edit the following in D:\apache-tomcat\webapps\geo\WEB-INF\web.xml:

<init-param>
<param-name>logs.dir</param-name>
<param-value>D:\Appdynamics\geo\log</param-value>
</init-param>
<init-param>
<param-name>ip.mapping.config</param-name>
<param-value>D:\Appdynamics\geo\local-map.xml</param-value>
</init-param>

8. Start the Tomcat server.
9. Test as follows on a Web browser that is not IE:

http://<host>:<port>/geo/resolve.js?ipdebug=true&ip=192.168.1.1

If, for example, you mapped 192.168.1.1 to India/Kernataka/Bangalore, the result would be a JSON document similar to this:

((window.ADRUM || {}).geo || {}).result = {
"country": "India",
"region": "Karnataka"
"city": "Bangalore"
"localIP": "c0180101"
}

(info) The localIP value is a hex-encoded version of the original IP (in this case, 192.168.1.1), compressed for space.  

Learn More