Previous Topic: MAC Statement—Specify the Media Access Control (MAC) AddressNext Topic: MESSAGECLASS Statement—Specify the Java Class of the JMS Message


MBEAN Statement—Specify the Name of the MBean

The MBEAN statement specifies the name of an MBean in a JMX job. An MBean is a managed bean (Java object) that represents an application, a device, or any resource that you want to manage. In a JMX-MBean Subscribe job, you can also indicate continuous monitoring by specifying an alert name to trigger.

Supported Job Types

This statement is required for the following job types:

Syntax

This statement has the following format:

domain_name:key=value[,key=value...]

Specifies the full object name of an MBean.

domain_name

Specifies the default domain name.

key=value[,key=value...]

Specifies one or more key=value pairs.

Limits: Up to 1024 characters; case-sensitive

Example: 'DefaultDomain:type=SimpleDynamic,index=3'

CONTINUOUS(alertid)

(Optional) Specifies the identifier of an alert to be triggered when the JMX-MBean Subscribe job receives an MBean notification. Defines the job as continuous. To end continuous monitoring, you must complete the job manually or cancel it. If you do not specify this operand, the job completes when the agent detects the notification. The agent ignores all notifications that do no match the filter.

alertid

Specifies the alert identifier to be triggered.

Limits: 1-8 alphanumeric characters; the first character must be alphabetic

Note: The alert must have been previously defined to the scheduling manager. Not all scheduling managers support the CONTINUOUS operand.

Note: Enclose values that contain delimiters (such as spaces) in double quotation marks.

Example: Query a JMX Server for the Value of an MBean Attribute

Suppose that you want to know the value of the cachesize attribute for the Config MBean. The URL for the JMX server is service:jmx:rmi:///jndi/rmi://localhost:9999/server, where localhost is the host name and 9999 is the port number.

AGENT APPAGENT
URL service:jmx:rmi:///jndi/rmi://localhost:9999/server
MBEAN 'DefaultDomain:index=1,type=Config'
ATTRIBUTE cachesize

Example: Set Up Notifications for Change to an MBean Attribute

Suppose that you want to set up continuous monitoring for changes to the cachesize attribute of the MBean named Config. The job filters the notifications the MBean sends by attribute. Each time the cachesize attribute changes, an alert named CHGA is sent.

AGENT APPAGENT
URL service:jmx:rmi:///jndi/rmi://localhost:9999/server
MBEAN 'DefaultDomain:index=1,type=Config' CONTINUOUS(CHGA)
ATTRIBUTESFILTER cachesize