Configures the JMX monitoring service subsystem.
Synopsis
asadmin [asadmin-options] set-jmx-monitoring-configuration
[--help]
[--target target]
[--enabled={false|true}]
[--amx={false|true}]
[--logFrequency frequency]
[--logFrequencyUnit={DAYS|HOURS|MINUTES|SECONDS|MILLISECONDS}]
[--addAttribute="attributes"]
[--delAttribute="name"]
[--set-notifiers notifiers]
[--enable-notifiers notifiers]
[--disable-notifiers notifiers]
Options
- asadmin-options
-
Options for the
asadminutility. For information about these options, see theasadminhelp page. --help-?-
Displays the help text for the subcommand.
--target-
This option helps specify the target on which you are configuring the JMX monitoring service. Valid values are:
server-
Applies to the default server instance. This is the default value.
- cluster_name
-
Applies to every server instance in the cluster.
- instance_name
-
Applies to a specified server instance.
--enabled-
Defaults to
false. Enables or disables the JMX monitoring service --dynamic-
Defaults to
false. When set totrue, applies the changes without a server restart. --amx-
Defaults to
false. Whether to enable or disable the AMX subsystem on boot. --addAttribute-
Provides a way to add a new MBean attribute to monitor using the service.
This argument takes in a string of space-delimited key-value pairs corresponding to the values of a JMX MBean definition. The
attributeNameandobjectNamefields are required, butdescriptionis not.For example, providing
attributeName=HeapMemoryUsagedenotes that the name of the MBean attribute to log isHeapMemoryUsage, whileobjectName=java.lang:type=Memorydenotes theObjectNameof the MBean to look for the attribute on isjava.lang:type=Memory. --delAttribute-
Provides a way to remove an MBean attribute that is being monitored by the JMX Monitoring service.
Use the name of the attribute that you want to remove from the monitoring output.
--logFrequency-
Defaults to
15. The frequency that the service will use to periodically log monitoring entries. --logFrequencyUnit-
Defaults to
SECONDS. The time unit to set the frequency of the log done by the JMX Monitoring service. --set-notifiers-
Use the option to set the notifiers that will receive notifications generated by the JMX Monitoring service.
A comma-separated list can be used to represent multiple notifiers.
This option will replace all the notifiers that have already been set to the JMX Monitoring Service. --enable-notifiers-
Use the option to enable one or more notifiers for the JMX Monitoring service.
A comma-separated list can be used to represent multiple notifiers.
--disable-notifiers-
Use the option to disable one or more notifiers for the JMX Monitoring service.
A comma-separated list can be used to represent multiple notifiers.
Examples
Example 1 Enables JMX monitoring service along with the AMX subsystem
asadmin set-jmx-monitoring-configuration --enabled=true --dynamic=true --amx=true --target=server
Example 2 Enables JMX monitoring service and monitors the amount of used Heap memory of the server’s JVM
asadmin set-jmx-monitoring-configuration --addAttribute 'attributeName=HeapMemoryUsage.used objectName=java.lang:type=Memory' --enabled true
Example 3 Enables JMX monitoring service and configures the logging frequency to 5 minutes
asadmin set-jmx-monitoring-configuration --logFrequency 5 --logFrequencyUnit MINUTES --enabled true