Monitoring Service

Payara Server provides capabilities for monitoring its runtime environment. The Monitoring Service can be used to collect statistics of a running server instance. This information is critical for discovering possible issues, troubleshooting, improving performance and making sure everything is running as excepted.

Configuring Monitoring Service

The following mechanisms are available to configure the Monitoring Service settings.

Using the Administration Console

To configure the Monitoring Service in the Administration Console, go to Configuration → [instance-configuration (like server-config)] → Monitoring:

Monitoring Service Configuration in the Admin Console

Using the Asadmin CLI

To configure the Monitoring Service from the command line, run the following command:

asadmin> set-monitoring-service-configuration --enabled=true --mbeansenabled=true --target=server

More information on the options available to this command and how it works can be found in the following section.

Monitoring Service Asadmin Command Reference

The following is a detailed list of the administration commands that can be used to correctly configure the Monitoring Service.

set-monitoring-service-configuration

Usage

asadmin> set-monitoring-service-configuration --enabled=true|false --mbeansenabled=true|false --amxenabled=true|false

Aim

This command can be used to set all configuration of the Monitoring Service at once.

Command Options

Option Type Description Default Mandatory

--enabled

Boolean

Whether to enable or disable the service.

N/A

no

--mbeansenabled

Boolean

Whether to enable or disable MBean monitoring.

N/A

no

--amxenabled

Boolean

Whether to enable or disable AMX on boot.

N/A

no

--target

String

The name of the configuration to set the monitoring service configuration on.

server

no

Example

asadmin > set-monitoring-service-configuration
    --enabled=true
    --mbeansenabled=true
    --amxenabled=true
    --target=server

get-monitoring-service-configuration

Usage

asadmin> get-monitoring-service-configuration

Aim

This command can be used to list the configuration settings of the Monitoring Service.

Command Options

Option Type Description Default Mandatory

--target

String

The name of the configuration to get the monitoring service configuration from.

server

no

Example

asadmin > get-monitoring-service-configuration --target=server

set-monitoring-level

Usage

asadmin> set-monitoring-level

Aim

This command can be used set monitoring level of a module.

Command Options

Option Type Description Default Mandatory

--module

String

The name of the module.

N/A

yes

--level

String

Allows you to change monitoring level for a module to OFF, LOW or HIGH.

N/A

yes

--target

String

The name of the configuration to get the monitoring service configuration from.

server

no

Example

asadmin > set-monitoring-level
     --module=jvm
     --level=HIGH
     --target=server

You can also set monitoring level for multiple modules using example below:

asadmin > set-monitoring-level
     --module=jvm,http-service
     --level=HIGH,LOW
     --target=server

get-monitoring-level

Usage

asadmin> get-monitoring-level

Aim

This command can be used to get monitoring level of a module.

Command Options

Option Type Description Default Mandatory

--module

String

The name of the module.

N/A

no

--target

String

The name of the configuration to get the monitoring service configuration from.

server

no

Example

asadmin > get-monitoring-level
     --module=jvm
     --target=server

You can also get monitoring level for all available modules using example below:

asadmin > get-monitoring-level
     --target=server

This will generate an output similar to the following:

Module                       Monitoring Level
cloud                        OFF
cloud-elasticity             OFF
cloud-orchestrator           OFF
cloud-tenant-manager         OFF
cloud-virt-assembly-service  OFF
connector-connection-pool    OFF
connector-service            OFF
deployment                   OFF
ejb-container                OFF
http-service                 LOW
jdbc-connection-pool         OFF
jersey                       OFF
jms-service                  OFF
jpa                          OFF
jvm                          HIGH
orb                          OFF
security                     OFF
thread-pool                  OFF
transaction-service          OFF
web-container                OFF
web-services-container       OFF

restart-monitoring

Usage

asadmin> restart-monitoring

Aim

This command can be used to restart monitoring levels.

The command will set all modules to OFF before setting them to their previous level.

Command Options

Option Type Description Default Mandatory

--target

String

The name of the configuration to get the monitoring service configuration from.

server-config

no

--verbose

String

Enable verbose output for the current command.

false

no

Example

asadmin > restart-monitoring --target=server-config

This will generate an output similar to the following:

Restarted 3 modules

You can use the verbose mode to see which modules were affected and what monitoring level they are currently set to:

asadmin > restart-monitoring
     --target=server
     --verbose

This will generate an output similar to the following:

Module                       Monitoring Level
cloud                        HIGH
cloud-elasticity             LOW
cloud-orchestrator           HIGH