Showing results for 
Show  only  | Search instead for 
Did you mean: 
AppDynamics Team (Retired)

What are the steps to set up and configure APM for Events Service, when deploying Analytics on-prem?



The Events Service should have its own Java Agent and Machine Agent.


Step 1. How do I set up Machine Agents for Events Service Nodes?

To monitor the hardware health of the Events Service nodes, this example uses a Machine Agent installation. For more details, see the AppDynamics Machine Agent installation documentation.

Link each Machine Agent with either:

  • the Events Service's API,  or
  • the Events Service's Elasticsearch Java Agents


The unique host ID configuration option enables the linking.


Complete the following procedure:

  1. Decide whether you are linking the Machine Agent to the Events Service API or the Events Service Elasticsearch.

  2. Note the relevant uniqueHostId value that you configured in the vmoptions file. For example: 


  1. Edit <machine-agent-home>\conf\controller-info.xml such that <unique-host-id>EventsService01</unique-host-id> corresponds to that value.

  2. Verify that the Java Agent and Machine Agent are associated by viewing the Applications > Tiers and Nodes tab in the Controller:


Step 2. Set up application Agents for the Events Service

Common Application Agent Configurations

  1. Locate your Events Service and Java Agent directories. For this example, use the following:
    /opt/appdynamics/events-service = <Events-Service-Home>
    /opt/appdynamics/AppAgent = <AppAgent-Home>

  2. Collect Controller information by using the information in the following table:


    Example Data





    account name


    access key


    name of the APM application that monitors the Events Service



  1. Edit the controller-info.xml file.
    Add your equivalent to <controller_host>, <controller_port>, <account_name>, <access_key> to AppAgent <AppAgent-Home>/conf/ or the relative directory to be <AppAgent-Home>/conf/controller-info.xml

  2. Edit the events-service.vmoptions file under <Events-Service-Home>/processor/config>
    1. Add -javaagent:<AppAgent-Home>/javaagent.jar in the events-service.vmoptions file
    2. Stop the event service.
      ./bin/ stop
    3. Restart the event service to match the new configuration. 
      ./bin/ start -p ./conf/ &


Step 3. Set Up an Application Agent for Elasticsearch

  1. Add a security policy for AppAgent file to access from within the Elasticsearch process. Create the <Events-Service-Home>/conf/elasticsearch.policy file:
grant codeBase "file:<AppAgent-Home>/-”


  1. Create and edit a new <Events-Service-Home>/conf/elasticsearch.vmoptions file.
    1. Copy the existing <Events-Service-Home>/conf/events-service.vmoptions file
    2. Enable a separate vmoptions file for Elasticsearch by editing the <Events-Service-Home>/conf/ property as follows:

  2. Append the following new properties to the new elasticsearch.vmoptions file.


  1. Specify a hard (not relative) path in

  2. Append the following new properties to events-service.vmoptions


Step 4. Begin Monitoring

  1. Manually restart the single Events Service process that you are trying to instrument:
    bin/ stop
    bin/ start -p conf/ &

  2. Through the Controller UI, verify that both Application Agents are reporting:
    Both agents rerporting check.png

  3. To prevent termination after logoff of jobs, detach the job that you just started from the active terminal by using the disown command:
    #[1] bin/ start -p conf/ disown %1




Where do I view logs?

View the logs from their typical locations, shown in the following table:




API store




Java Application Agent

<AppAgent-Home>/ver<Your App Agent Version>/logs/<Your agent.nodeName>/agent<Latest App Agent Start Time>.log


How do I troubleshoot common problems?

Run troubleshooting commands when you encounter common problems.



When Elasticsearch is starting, you see vm.max_map_count errors

sudo sysctl -w vm.max_map_count=262144

If the system starts running out of descriptors, check /etc/security/limits.conf

Substitute the name of the user running Elasticsearch for the asterisk ("*")

echo "*" soft nofile   65536" | sudo tee -a etc/security/limits.conf

echo "*" hard nofile   65536" | sudo tee -a etc/security/limits.conf


Version history
Last update:
‎05-14-2020 11:57 PM
Updated by: