Installing Java agent in WildFly 9.x and above
- Extract the ZIP file to a new directory to find the agent's JAR file and its configuration files.
- Configure the properties such as license key, application name and port in the apminsight.conf file located in the extracted folder.
- Follow either of the following based on your setup:
Stand-alone setup
- Edit the <WILDFLY_HOME>/bin/standalone.conf.bat file (in Linux, the standalone.conf file) to add the following Java arguments to the existing JAVA_OPTS.
-Djboss.modules.system.pkgs=org.jboss.byteman,com.manageengine -javaagent:<agent_directory_full_path>/apminsight-javaagent.jar
- Save the file and restart the WildFly server.
Video
Here's a quick video on how to install a Site24x7 APM Insight Java agent in WildFly server 9.x and above (standalone setup).
Domain setup
You can add the Site24x7 APM Insight Java agent to the WildFly server via either of the following methods:
By updating the Host.xml file
Follow the step below to add the Site24x7 APM Insight Java agent to the WildFly server by updating the configuration file:
- Edit the <WILDFLY_HOME>/domain/configuration/Host.xml file, locate the <servers> tag, and add the following tags under your desired <server name="your_server" ...>tag.
<system-properties>
- Save the file and restart the WildFly server
From the admin console
Follow the steps below to add the Site24x7 APM Insight Java agent to the WildFly server(s) from the WildFly admin console:
- Launch the WildFly application server console.
- Go to the Runtime tab, click Hosts, then choose the host with the desired server group(s).
- Select the server and click View.
- Go to the JVMs tab and click Add.
- In the pop-up menu, provide a desired name for the JVM, then click Add.
- Select the added JVM and click Edit.
- In the JVM Options field, add the agent's JAR file path in the following format, press the Enter key, then click the Save button.
-javaagent:{agent_jar_folder}/apminsight-javaagent.jar
A successfully modified message will be shown.
- Restart the WildFly application server (in domain mode). The Site24x7 APM Insight Java agent will now be hooked to the appropriate WildFly server.
- The same steps can be repeated to add the agent to different servers running under the domain.
- If the group of servers in domain mode is spread across different hosts, then you must repeat steps 1 and 2 for each host.