In order to monitor a Resin server, the JMX Remote Agent must be enabled. In addition, web application statistics must be enabled by adding the
<statistics-enable /> element to either the
<web-app-default /> or
<web-app /> elements in resin.conf.
Note: If you are not sure how to enable this, consult the "JMX Console" section of the Resin documentation.
Finally, SOASTA CloudTest must be able to establish a TCP/IP connection to the JMX Remote Agent port on the server.
If a firewall prevents TCP/IP access, see Monitoring a Server Behind a Firewall.
SOASTA CloudTest can currently monitor Caucho Resin 3.1.6.
- In the Central list, select Monitoring Server Groups.
- Click the New Monitoring Server Group icon. The Monitoring Server / Monitor wizard appears.
- Select Monitor Server and click Next. The Name and Connection step is shown.
- Type a name for the Monitoring Server and optionally provide a description. Finally type the hostname or IP address of the server into the Host field and click Add, and then click Next.
- The Resources step is shown. Check "App Servers" and click Next.
- Select Resin, then enter the JMX port number, the user name, and password. The user name and password are not always required. Check with your network administrator. Note that Resin does not have a default port. It is chosen when you set up the JMX Remote Agent.
- Click the Test Connection button to test the connection. If the connection is successful, the connection success is indicated in green text. If the connection fails, you will see an error message in red text.
- Click Next. Review the information to be sure it is correct, then check the "Create a new Monitor for this Monitor Server" box and click Finish.
Enter a name for the Monitor and an optional description, then click Next.
- At this point you can choose which statistics you are interested in. For each statistic, you can choose a "sample rate" which determines how often that statistic will be collected.
In addition to the standard statistics that are offered (for example, "JVM Heap Size"), you can track the value of any JMX MBean attribute. For example, to track the current number of sessions in the web application
/resin-doc, check the "JMX Attribute" box, and in the "Arguments" column enter:
You can use the "Add Custom Object" button to add as many JMX MBean attributes as you like. Some more examples:
- To track the total amount of time spent processing HTTP requests for the web application
/resin-docsince Resin started, in the "Arguments" column enter:
- To track the current number of threads in the Resin thread pool, in the "Arguments" column enter:
When you are finished, click Next.
- Review the information to be sure it is correct, then click Finish.
- To start or stop monitoring, see Starting and Stopping a Monitor
To automatically monitor the Resin server every time a certain test starts, see Starting a Monitor Automatically When a Test Composition Runs
You can also combine system, database, and ColdFusion statistics within the same monitor.