Monitoring JBoss AS or WildFly
You can comprehensively monitor your JBoss Application Server (AS) or WildFly with the Instana JBoss AS sensor to identify bottlenecks and optimize application performance. The Instana JBoss AS sensor is automatically installed after you install the Instana host agent. To monitor JBoss, enable statistics in JBoss. You can then view metrics that are related to JBoss AS or WildFly in the Instana UI.
Prerequisites
Before you configure the JBoss AS sensor for monitoring JBoss AS, make sure that you meet the following prerequisites:
- The Instana host agent is installed. For more information about installing the agent, see Installing host agents.
- The JBoss AS sensor is compatible with your current setup. For more information, see Support information.
Support information
To make sure that the sensor is compatible with your current setup, check the following support information sections:
Supported versions and support policy
The sensor supports JBoss AS 4, JBoss AS 7.x, Wildfly 10 and later, and JBoss EAP 8 and later.
The following table shows the latest supported version and support policy:
| Technology | Support policy | Latest technology version | Latest supported version |
|---|---|---|---|
| JBoss AS | 45 days | 7.1.1 | 7.1.1 |
| JBoss Wildfly | 45 days | 39.0.1.Final | 39.0.1.Final |
| JBoss EAP | 45 days | 8.1.5 | 8.1.5 |
For more information about the support policy, see Support strategy for sensors.
Supported client-side tracing
Instana supports tracing for JBoss AS. For more information about supported frameworks and libraries for tracing, see Instrumented frameworks and libraries.
Configuring JBoss AS or WildFly
After you install the agent, the Instana JBoss sensor is automatically installed and deployed. Though the JBoss sensor is enabled by default, it starts to collect JBoss monitoring data only after you enable statistics in JBoss or WildFly.
You can enable statistics in both stand-alone and domain modes of JBoss configuration.
-
Stand-alone mode: A single instance of JBoss running on a single host, where each instance is managed independently.
-
Domain mode: Multiple instances of JBoss running on multiple hosts, where all instances are managed centrally by a domain controller.
After you enable statistics in the JBoss, the Instana JBoss sensor starts collecting monitoring data from your JBoss environment.
Enabling statistics in the stand-alone mode
For Instana to collect metrics from JBoss or WildFly, you need to enable statistics for undertow and data sources by setting statistics-enabled="true" in the JBoss XML configuration file.
-
To enable statistics for undertow, modify the JBoss XML configuration file as follows:
<subsystem xmlns="urn:jboss:domain:undertow:3.0" statistics-enabled="true"> -
To enable statistics for data source, modify the JBoss XML configuration file as follows:
<datasource jta="true" jndi-name="java:jboss/datasources/DemoDS" pool-name="DemoDS" enabled="true" statistics-enabled="true">
Enabling statistics in the domain mode
To enable statistics in domain mode, you can use the JBoss Management Console:
- From the Runtime section in the JBoss Management console, select your Server Group.
- From the Configuration section, select the profile that is associated to your server group in the Profile section.
- In the Subsystem section, go to Web/HTTP - Undertow, and change
Statistics enabled:falsetoStatistics enabled:true.
Optional: Naming JBoss
If you want to set a custom name for your JBoss instance in Instana, use the following command. Replace myjbossnodename with the preferred name for your JBoss instance.
-Djboss.node.name=myjbossnodename
Optional: Configuring the JBoss AS sensor
After you install the Instana host agent and enable statistics in JBoss, the JBoss sensor starts to collect JBoss monitoring data.
If you want, you can change the JBoss sensor configuration by modifying the Instana agent configuration file <agent_install_dir>/etc/instana/configuration.yaml as shown in the following example:
com.instana.plugin.jbossas:
poll_rate: 5 # seconds
monitor-ejb-deployments: false
monitor-ejb-deployments-regex: '' # provide regex for ejb deployment you want to monitor i.e xyz*
monitor-web-deployments-regex: '' # provide regex for web deployment you want to monitor i.e xyz*
monitor-data-source-config-regex: '' # provide regex for data source configuration you want to monitor i.e xyz*
monitor-connector-regex: '' # provide regex for connectors configuration you want to monitor i.e xyz*
Configuring the polling rate
You can configure how often Instana polls JBoss AS to collect data and metrics by using the poll_rate parameter in the agent configuration.yaml file as shown in the following example:
com.instana.plugin.jbossas:
poll_rate: 5 # values are in seconds. Default value is 5 second.
Configuration parameters
The following table outlines the configuration parameters:
| Configuration parameters | Description | Default value |
|---|---|---|
poll_rate |
The interval at which the sensor polls performance metrics. | 5 seconds |
monitor-ejb-deployments |
The option to monitor EJB deployments. | true |
monitor-ejb-deployments-regex |
A regex pattern to filter EJB deployments. | |
monitor-web-deployments-regex |
A regex pattern to filter web deployments. | |
monitor-data-source-config-regex |
A regex pattern to filter data source configurations. | |
monitor-connector-regex |
A regex pattern to filter connectors. |
On a broad scale, the JBoss API might be inefficient. Therefore, the sensor polls performance metrics every 5 seconds. You can configure the polling interval by modifying the value in the metrics-interval field.
In certain earlier versions of JBoss, calls to retrieve EJB deployments data can cause various errors due to existing bugs. The JBoss sensor monitors EJB deployments by default, but you can disable it if these bugs occur or if not required. To disable monitoring of EJB deployments, modify the monitor-ejb-deployments flag in the configuration file.
By default, JBoss regex monitoring for EJB deployments, web deployments, data source, and connector is not enabled. You can configure JBoss regex for monitoring a particular deployment in the agent configuration file.
Viewing JBoss metrics
You can view all the information about your JBoss AS or WildFly in the Instana UI.
To view JBoss metrics, complete the following steps:
- From the navigation menu in the Instana UI, select Infrastructure.
- Click a specific monitored host.
You can see a host dashboard with all the collected metrics and monitored processes, including configuration data, performance metrics, heath signature, and traces.
Configuration data
Instana collects the following configuration data from your JBoss instance:
| Configuration item | Description |
|---|---|
| Version | JBoss or Wildfly release version and product name |
| Server | Server name in domain mode and hostname in standalone mode |
| Node | Node name |
| Home | JBoss home directory path |
| Deployments | Web deployment name and context root |
Performance metrics
Instana collects the following performance metrics from your JBoss instance:
| Metric | Module | Description |
|---|---|---|
| Requests | Servlets | Number of requests received per servlet |
| Average Response Time | Servlets | Average response time per servlet (in milliseconds) |
| Active Sessions | Web deployments | Number of active sessions per web deployment |
| Errors | Connectors | Number of connector errors |
| Requests | Connectors | Number of connector requests |
| Average Response Time | Connectors | Average response time for connectors (in milliseconds) |
| Pool Size | EJB deployments | Maximum allowed size of the EJB instance pool |
| Pool Available | EJB deployments | Number of idle EJB instances available in the pool |
| Active Connections | Data sources | Number of active connections in the datasource pool |
| Available Connections | Data sources | Number of available connections in the datasource pool |
| Connections Created | Data sources | Number of connections created |
| Connections In Use | Data sources | Number of connections that are currently in use |
| Timed Out | Data sources | Number of connections that timed out |
| Time Waited For Exclusive Lock On Pool | Data sources | Total wait time for acquiring connections from the pool (in milliseconds) |
| Time Spent On Creating Connections | Data sources | Total time spent creating connections (in milliseconds) |
| Active Connections | Connection pools (JBoss 4) | Number of active connections in the connection pool |
| Available Connections | Connection pools (JBoss 4) | Number of available connections in the connection pool |
| Connections In Use | Connection pools (JBoss 4) | Number of connections that are currently in use |
| Connections Created | Connection pools (JBoss 4) | Total number of connections that are created |
| Connections Used Percentage | Connection pools (JBoss 4) | Percentage of connections that are used in the pool |
| Current Thread Count | Thread pools (JBoss 4) | Current number of threads in the pool |
| Current Busy Threads | Thread pools (JBoss 4) | Number of threads that are currently busy |
| Min Spare Threads | Thread pools (JBoss 4) | Minimum number of spare threads |
| Max Spare Threads | Thread pools (JBoss 4) | Maximum number of spare threads |
| Threads Used Percentage | Thread pools (JBoss 4) | Percentage of threads used in the pool |
| Busy Worker Thread Count | Workers (EAP 7.0.9 and later) | Number of busy worker threads per worker |
| Worker Queue Size | Workers (EAP 7.0.9 and later) | Size of the worker queue per worker |
| Connection Count | Workers (EAP 7.0.9 and later) | Number of connections per worker server address |
Health Signatures
Each sensor has a curated knowledge base of health signatures that are evaluated continuously against the incoming metrics and are used to raise issues or incidents that depend on user impact.
Built-in events trigger issues or incidents based on failing health signatures on entities, and custom events trigger issues or incidents based on the thresholds of an individual metric of any specific entity.
For information about built-in events for the JBoss sensor, see the Built-in events reference.
Viewing traces
After you install the Instana host agent, the Instana agent automatically instruments all the JVM-based applications to collect the traces (request-level data).
You can view the traces of these Java applications in the Analytics dashboard in the Instana UI. For more information about viewing traces, see Analyzing traces and calls.