The Tomcat agent monitors
the resources of Tomcat application servers. This agent requires an
instance name, so you must create the first agent instance and start
the agent manually.
About this task
The Tomcat agent is a multiple instance
agent; you must create the first instance and start the agent manually. The managed system name
includes the instance name that you specify, for example,
instance_name:host_name:pc,
where pc is your two character product code. The managed system name is limited
to 32 characters. The instance name that you specify is limited to 28 characters, minus the length
of your host name. For example, if you specify TOMCAT2 as your instance name, your
managed system name is TOMCAT2:hostname:OT. If you specify a long instance name,
the managed system name is truncated and the agent code does not display correctly.
To avoid permission issues when you configure the agent, be sure to use the same root user or
non-root user ID that was used for installing the agent. If you installed your agent as a selected
user and want to configure the agent as a different user, see Configuring agents as a non-root user. If you installed and configured your agent as a
selected user and want to start the agent as a different user, see Starting agents as a non-root user.
Procedure
- To configure the agent with the default settings, not responding
to prompts, complete the following steps:
- Enter:
install_dir/bin/tomcat-agent.sh
config instance_name install_dir/samples/tomcat_silent_config.txt
where- install_dir
- The installation directory of the Tomcat agent.
- instance_name
- The name you want to give to the instance.
- To start the agent, enter:
install_dir/bin/tomcat-agent.sh
start instance_name
Remember: This configuration
works when the following requirements are fulfilled:
- The agent is installed in the default directory.
- The Tomcat server uses the port 8686.
- The Tomcat server is configured without JMX authorization.
- To configure the agent by editing the silent response file
and running the script with no interaction, complete the following
steps:
- Open install_dir/samples/tomcat_silent_config.txt in
a text editor.
- For Java home, you can specify
the path where the Java™ virtual
machine is installed. The default location is /opt/ibm/apm/agent/JRE/lx8266/jre.
If the agent is not installed in the default directory, specify install_dir/JRE/lx8266/jre.
- For JMX user ID, you can specify the ID of
the user that you are using to connect to the Tomcat MBean server.
This setting is required if JMX authorization is enabled in Tomcat.
- For JMX password, you can specify the password
of the JMX user. This setting is required if JMX authorization is
enabled in Tomcat.
- For JMX service URL, you can
specify the service URL for connecting to the Tomcat MBean server.
The format of the URL is service:jmx:rmi:///jndi/rmi://host_name:port_number/jmxrmi.
The default URL is valid if the server is on the local host and uses
the port 8686. You can modify the host name and the port number in
the URL, keeping the same format.
- Save and close the tomcat_silent_config.txt file,
then enter:
install_dir/bin/tomcat-agent.sh
config instance_name install_dir/samples/tomcat_silent_config.txt
Where instance_name is
the name that you want to give to the instance.
- To start the agent, enter:
install_dir/bin/tomcat-agent.sh
start instance_name
- To configure the agent by running the script and responding
to prompts, complete the following steps:
- Enter:
install_dir/bin/tomcat-agent.sh
config instance_name
Where instance_name is
the name you want to give to the instance.
- When prompted for SERVER, press Enter to accept
the default server name or specify your own server name.
- When prompted for Java home, press
Enter to accept the default location where the Java virtual machine is installed. The default
location is /opt/ibm/apm/agent/JRE/lx8266/jre.
If the agent is not installed in the default directory, specify install_dir/JRE/lx8266/jre.
- When prompted for JMX user ID, specify the ID
of the user that you are using to connect to the Tomcat MBean server.
If JMX authorization is not enabled, press Enter.
- When prompted for JMX password, specify the password
of the JMX user and confirm it. If JMX authorization is not enabled,
press Enter.
- When prompted for JMX service URL,
press Enter to accept the URL or specify another service URL for connecting
to the Tomcat MBean server. The format of the URL is service:jmx:rmi:///jndi/rmi://host_name:port_number/jmxrmi.
The default URL is valid if the server is on the local host and uses
the port 8686. You can modify the host name and the port in the URL,
keeping the same format.
- To start the agent, enter:
install_dir/bin/tomcat-agent.sh
start instance_name
What to do next
You can verify the Tomcat agent data is
displayed in the Performance Management console.
If you installed and configured your agent using a selected user and want to start the agent with
a different user, see Starting agents as a non-root user.