The WildFly integration collects WildFly logs and parses them into a JSON payload. The result includes source, message code, level, and message.
For more information about WildFly, see the WildFly documentation.
Prerequisites
To collect WildFly telemetry, you must install the Ops Agent:
- For metrics, install version 2.12.0 or higher.
- For logs, install version 2.11.0 or higher.
This integration supports WildFly versions 26.x and 25.x.
Configure your WildFly instance
To expose the JMX endpoint remotely, you must set the
jboss.bind.address.management
system property. By default, this property is
set in WildFly's configuration. The default WildFly installation requires no JMX
authentication with JMX exposed locally on 127.0.0.1:9990
.
To collect session metrics, you must enable statistics on the undertow subsystem by running the following command using the JBoss CLI:
/subsystem=undertow:write-attribute(name=statistics-enabled,value=true)
Configure the Ops Agent for WildFly
Following the guide for Configuring the Ops Agent, add the required elements to collect telemetry from WildFly instances, and restart the agent.
Example configuration
The following command creates the configuration to collect and ingest telemetry for WildFly and restarts the Ops Agent.
Configure logs collection
To ingest logs from WildFly, you must create receivers for the logs that WildFly produces and then create a pipeline for the new receivers.
To configure a receiver for your wildfly_system
logs, specify the following
fields:
Field | Default | Description |
---|---|---|
exclude_paths |
A list of filesystem path patterns to exclude from the set matched by include_paths. | |
include_paths |
[/opt/wildfly/standalone/log/server.log, /opt/wildfly/domain/servers/*/log/server.log] |
A list of filesystem paths to read by tailing each file. A wild card (* ) can be used in the paths; for example, /var/log/wildfly/.log. |
record_log_file_path |
false |
If set to true , then the path to the specific file from which the log record was obtained appears in the output log entry as the value of the agent.googleapis.com/log_file_path label. When using a wildcard, only the path of the file from which the record was obtained is recorded. |
type |
The value must be wildfly_system . |
|
wildcard_refresh_interval |
60s |
The interval at which wildcard file paths in include_paths are refreshed. Given as a time duration parsable by time.ParseDuration , for example 30s or 2m . This property might be useful under high logging throughputs where log files are rotated faster than the default interval. Must be a multiple of 1s. |
What is logged
The logName
is derived from
the receiver IDs specified in the configuration. Detailed fields inside the
LogEntry
are as follows.
The wildfly_system
logs contain the following fields in the LogEntry
:
Field | Type | Description |
---|---|---|
jsonPayload.level |
string | Log entry level |
jsonPayload.message |
string | Log message |
jsonPayload.messageCode |
string | Wildfly specific message code preceding the log, where applicable |
jsonPayload.source |
string | Source where the log originated |
jsonPayload.thread |
string | Thread where the log originated |
severity |
string (LogSeverity ) |
Log entry level (translated). |
Configure metrics collection
To ingest metrics from WildFly, you must create receivers for the metrics that WildFly produces and then create a pipeline for the new receivers.
To configure a receiver for your wildfly
metrics, specify the following
fields:
Field | Default | Description |
---|---|---|
additional_jars |
/opt/wildfly/bin/client/jboss-client.jar |
The path to the jboss-client.jar file, which is required to monitor WildFly through JMX. |
collection_interval |
60s |
A time duration value, such as 30s or 5m . |
endpoint |
service:jmx:remote+http://localhost:9990 |
The JMX Service URL or host and port used to construct the service URL. This value must be in the form of host:port , which is used to create a service URL of service:jmx:remote+http://<host>:<port>/jmxrmi . |
password |
The configured password if JMX is configured to require authentication. | |
type |
This value must be wildfly . |
|
username |
The configured username if JMX is configured to require authentication. |
What is monitored
The following table provides the list of metrics that the Ops Agent collects from the WildFly instance.
Metric type | |
---|---|
Kind, Type Monitored resources |
Labels |
workload.googleapis.com/wildfly.jdbc.connection.open
|
|
GAUGE , INT64 gce_instance |
data_source state
|
workload.googleapis.com/wildfly.jdbc.request.wait
|
|
CUMULATIVE , INT64 gce_instance |
data_source
|
workload.googleapis.com/wildfly.jdbc.rollback.count
|
|
CUMULATIVE , INT64 gce_instance |
cause
|
workload.googleapis.com/wildfly.jdbc.transaction.count
|
|
CUMULATIVE , INT64 gce_instance |
|
workload.googleapis.com/wildfly.network.io
|
|
CUMULATIVE , INT64 gce_instance |
listener server state
|
workload.googleapis.com/wildfly.request.count
|
|
CUMULATIVE , INT64 gce_instance |
listener server
|
workload.googleapis.com/wildfly.request.server_error
|
|
CUMULATIVE , INT64 gce_instance |
listener server
|
workload.googleapis.com/wildfly.request.time
|
|
CUMULATIVE , INT64 gce_instance |
listener server
|
workload.googleapis.com/wildfly.session.active
|
|
GAUGE , INT64 gce_instance |
deployment
|
workload.googleapis.com/wildfly.session.count
|
|
CUMULATIVE , INT64 gce_instance |
deployment
|
workload.googleapis.com/wildfly.session.expired
|
|
CUMULATIVE , INT64 gce_instance |
deployment
|
workload.googleapis.com/wildfly.session.rejected
|
|
CUMULATIVE , INT64 gce_instance |
deployment
|
Sample dashboard
To view your WildFly metrics, you must have a chart or dashboard configured. Cloud Monitoring provides a library of sample dashboards for integrations, which contain preconfigured charts. For information about installing these dashboards, see Installing sample dashboards.
Verify the configuration
This section describes how to verify that you correctly configured the WildFly receiver. It might take one or two minutes for the Ops Agent to begin collecting telemetry.
To verify that the logs are ingested, go to the Logs Explorer and run the following query to view the WildFly logs:
resource.type="gce_instance"
log_id("wildfly_system")
To verify that the metrics are ingested, go to Metrics Explorer and run the following query in the MQL tab:
fetch gce_instance
| metric 'workload.googleapis.com/wildfly.network.io'
| every 1m
What's next
For a walkthrough on how to use Ansible to install the Ops Agent, configure a third-party application, and install a sample dashboard, see the Install the Ops Agent to troubleshoot third-party applications video.