Class MonitoringQueue


  • public class MonitoringQueue
    extends Object
    The MonitoringQueue class allows administrators to create acquisition queue for JMX monitoring data.

    A monitoring acquisition destination is an acquisition destination configured to transform JMX monitoring information into JMS messages. It works in 2 modes:

    • If the acquisition.period attribute is set (value greater than 0) the destination periodically scans the selected JMX attributes and generates a message with the value of these attributes.
    • In the other case, the user must send to the destination a message with the list of JMX attributes to scan and the destination creates a message with these values, or use the last known JMX attributes.
    Each message is delivered to an unique consumer.

    This queue is based on JMX monitoring so you must enable JMX monitoring to use it.

    • Field Detail

      • JMXAcquisition

        public static final String JMXAcquisition
        Class name of handler allowing to acquire JMX monitoring data.
        See Also:
        Constant Field Values
    • Constructor Detail

      • MonitoringQueue

        public MonitoringQueue()
    • Method Detail

      • create

        public static Queue create()
                            throws ConnectException,
                                   AdminException
        Administration method creating and deploying a JMX acquisition queue on the local server.

        The request fails if the destination deployment fails server side.

        Be careful this method use the static AdminModule connection.

        Returns:
        the created destination.
        Throws:
        ConnectException - If the administration connection is closed or broken.
        AdminException - If the request fails.
        See Also:
        create(int, String, Properties)
      • create

        public static Queue create​(int serverId)
                            throws ConnectException,
                                   AdminException
        Administration method creating and deploying a JMX acquisition queue on a given server.

        The request fails if the target server does not belong to the platform, or if the destination deployment fails server side.

        Be careful this method use the static AdminModule connection.

        Parameters:
        serverId - The identifier of the server where deploying the queue.
        Returns:
        the created destination.
        Throws:
        ConnectException - If the administration connection is closed or broken.
        AdminException - If the request fails.
        See Also:
        create(int, String, Properties)
      • create

        public static Queue create​(int serverId,
                                   String name)
                            throws ConnectException,
                                   AdminException
        Administration method creating and deploying a JMX acquisition queue on a given server.

        The request fails if the target server does not belong to the platform, or if the destination deployment fails server side.

        Be careful this method use the static AdminModule connection.

        Parameters:
        serverId - The identifier of the server where deploying the queue.
        name - The name of the created queue.
        Returns:
        the created destination.
        Throws:
        ConnectException - If the administration connection is closed or broken.
        AdminException - If the request fails.
        See Also:
        create(int, String, Properties)
      • create

        public static Queue create​(int serverId,
                                   String name,
                                   Properties props)
                            throws ConnectException,
                                   AdminException
        Administration method creating and deploying a JMX acquisition queue on a given server.

        A set of properties is used to configure the distribution destination:

        • period – .
        • acquisition.period - The period between two acquisitions, default is 0 (no periodic acquisition). If this last case the acquisition must be triggered by an incoming message, the destination properties can then be overloaded by the message ones.
        • persistent - Tells if produced messages will be persistent, default is true (JMS default).
        • expiration - Tells the life expectancy of produced messages, default is 0 (JMS default time to live).
        • priority - Tells the JMS priority of produced messages, default is 4 (JMS default).
        • Additionally to common acquisition parameters (see above), properties are used to indicate the list of JMX attributes that will be monitored. The property key is the name of the MBean and the value is a comma separated list of attributes to monitor for this MBean. The '*' character is allowed to monitor every parameter of the MBean. Accessing multiple MBeans is possible using wildcard characters, as defined in the javax.management.ObjectName class.
        The request fails if the target server does not belong to the platform, or if the destination deployment fails server side.

        Be careful this method use the static AdminModule connection.

        Parameters:
        serverId - The identifier of the server where deploying the queue.
        name - The name of the created queue.
        props - A Properties object containing all needed parameters.
        Returns:
        the created destination.
        Throws:
        ConnectException - If the administration connection is closed or broken.
        AdminException - If the request fails.