Chapter 5. Using the Management CLI with a Managed Domain
You can use the management CLI to configure and manage both standalone servers and managed domains. The JBoss EAP documentation usually shows examples of management CLI commands for a standalone server configuration. If you are running a managed domain instead, you often need to adjust the command. The following sections describe how to change standalone server management CLI commands for a managed domain configuration.
Specify the Profile for Subsystem Configuration
The management CLI commands for standalone server subsystem configuration begin with /subsystem=SUBSYSTEM_NAME
. For managed domain subsystem configuration, you must specify which profile’s subsystem to configure by starting the command with /profile=PROFILE_NAME/subsystem=SUBSYSTEM_NAME
.
Example: Read the Logging Subsystem Configuration (Standalone Server)
/subsystem=logging:read-resource
This example shows how to read the configuration of the logging
subsystem for a standalone server.
Example: Read the Logging Subsystem Configuration (Managed Domain)
/profile=default/subsystem=logging:read-resource
This example shows how to read the configuration of the logging
subsystem for a the default
profile in a managed domain.
Specify the Host for Core Management and Runtime Commands
Some core management and runtime commands for a managed domain require you to specify the host that the command applies to by starting the command with /host=HOST_NAME
.
Example: Enable Audit Logging (Standalone Server)
/core-service=management/access=audit/logger=audit-log:write-attribute(name=enabled,value=true)
This example shows how to enable audit logging for a standalone server.
Example: Enable Audit Logging (Managed Domain)
/host=master/core-service=management/access=audit/logger=audit-log:write-attribute(name=enabled,value=true)
This example shows how to enable audit logging for the master
host in a managed domain.
Some commands require the host as an argument, for example, reload --host=HOST_NAME
. If you do not specify a host for these commands, an error message notifies you that the --host
argument is required.
Specify the Server for Core Management and Runtime Commands
Some core management and runtime commands for a managed domain require you to specify the host and server that the command applies to by starting the command with /host=HOST_NAME/server=SERVER_NAME
.
Example: Display Runtime Metrics for a Deployment (Standalone Server)
/deployment=test-application.war/subsystem=undertow:read-attribute(name=active-sessions)
This example shows how to display runtime metrics for a standalone server deployment.
Example: Display Runtime Metrics for a Deployment (Managed Domain)
/host=master/server=server-one/deployment=test-application.war/subsystem=undertow:read-attribute(name=active-sessions)
This example shows how to display runtime metrics for a managed domain deployment that is deployed to the server-one
server on the master
host.