Execute MBean Operation

Introduction:

This section is common to all the editions of IT360 - Professional Edition, Enterprise Edition [Probes only] and MSP Edition [Probes only].

Actions of type, Execute MBean Operation, can be created, to invoke operations on MBeans of JMX Compliant Resources. The JMX compliant resources that are supported by IT360 are;

Creating a MBean Operation would be helpful, if you want to monitor the value of any custom attribute, and do any action, based on its value.

For e.g., if you want to shut down your JBoss server, when the number of threads running in it goes above a specified value, you can add the necessary code to the shutdown the server, on the JBoss Montor side, as a MBean operation and invoke this as a MBean Operation action, from IT360.

Steps to Execute a MBean Operation:

In order to execute a MBean operation, follow the below steps;

  1. Go to 'Admin --> Servers & Applications' and click 'Actions'.

  2. Click the Create Execute MBean Operation link, under the heading: Execute MBean Operation. The Create New MBean Operation Action - Step 1 of 4 page is diplayed.

Now, by following a simple set of 4 steps, you can create a MBean Operation;

  1. First Step: Enter the below details;

  1. Second Step: The list of domains, present in the agent you have selected, are displayed. Select any of the Domains and click on the button Show MBeans.

  2. Third Step: Select any one of the MBeans, for which you want to create the action, and click Show Operations.

  3. Fourth Step: All the MBean Operations are listed in this screen ,with varying return types and arguments. Click Create Action button, for the operation for which you want to create this action. A success message that you have created this action would be displayed, and the newly created action will be listed under the head Execute MBean Operations Action(s).

Note: You can give multiple values to the operation arguments, as comma separated values. For an operation with multiple arguments, the combinations of the values supplied, can also be executed. This is done in order to ensure that we need not create separate actions to represent different combinations of argument values.

For Example, if you want to create actions for the logging level of a product, the operation change logginLevel may take two arguments as, "User" and "Level". You can supply, Admin and Operator as values for User and debug, respectively, and info for Level. You can execute the operation manually, by choosing any of the combinations using the 'Manual Execution' option. By default, the first values given will be taken to execute the action, as Admin and debug, in the above example.

Passing multiple values can be further enhanced by using Replaceable Tags.


After creating the MBean Operation action, you will be directed to the the 'View Actions' page, where you can test the execution of that action in two ways;

Note: You can also perform the below tasks from the 'View Actions' page;

    1. Edit the action, by clicking the icon.

    2. You can click Add New, for creating more actions.

    3. You can delete the action, by clicking the Delete link. (After selecting the respective action's check box).

Note: There is a link Fetch data now, in the corresponding monitor details page, which will fetch the data from the server, after you have executed the action. This will help you to see the value of the custom attribute, without waiting for the next polling interval.

Top



Copyright © 2012, ZOHO Corp. All Rights Reserved.