eG Administration
 

Choosing the mode for configuring measures for a Jmx Test

eG Enterprise allows the flexibility to choose from multiple methods for configuring the measures of a new Jmx test; these methods are as follows:

  • MBean Auto Discovery

  • Load MBeans from File

  • Manual Entry

Using this page, you can pick one of these methods, and proceed to configure measures for a Jmx test using the chosen method. To access this page, click on the Configure button against a Jmx test in the USER DEFINED TESTS page. Alternatively, you can click on the Configure ‘testname’ link at the right, top corner of the MODIFY TEST DETAILS page to get here.

Each of the methods offered by this page has been elaborately discussed below.

MBean Auto Discovery

The MBean Auto Discovery option enables the eG manager to automatically discover the domains and MBeans supported by a target Java application, so that you can configure any of the Mbean attributes as a measure with minimal manual effort. Select this option if you do not know the exact Mbean attribute name to be configured as a measure for a new JMX test. When this option is chosen, an MBEANS DISCOVERY section will appear in this page, wherein the following will have to be specified:

  • Host Name / IP: Specify the host name / IP address of the system hosting the application that is to be monitored by this test.
  • Jmx Remote Port: Indicate the port at which the JMX of the target application listens.
  • JNDI Name: Specify the lookup name for connecting to the JMX connector. By default, this is set to jmxrmi.
  • User name and Password: By default, both these parameters are set to none. However, if JMX requires authentication only (but no security), then, ensure that these fields are configured with the credentials of a user with read-write access to JMX. To know how to create such a user, please refer to the eG Customization Manual.
  • Finally, click the Start discovery button.
  • Doing so will automatically populate the Domain Name drop-down list that appears in this page with the complete list of domains supported by the target application. From this list, pick the domain that contains the MBeans of interest to you.
  • To proceed with the configuration, click on the Configure button. This will invoke a NEW MEASURE DETAILS page using which the measures for the Jmx test can be configured.

Load MBeans from File

For Mbean Autodiscovery to work, the eG manager should be able to access the target application. However, in environments where connectivity issues exist between the eG manager and the target Java application - say, owing to strict firewall rules - autodiscovery of MBeans may not be possible. In such situations, you can enable the eG agent to load the MBeans of an application onto a file, and then make that file available on the eG manager host, so that the eG manager can download the MBeans from the file. The first step towards this end is to generate the file to which MBeans are to be loaded.

The eG agent is bundled with an AgentMbeanDiscovery.bat file, which is available in the {EG_INSTALL_DIR}\lib directory of the eG agent host. If this batch file is executed, it requests for information that enables access to the target Java application; upon accessing the application, the batch file automatically discovers the MBeans of that application and loads them on to a file.

Like the eG agent, the eG manager is also bundled with a batch file named MgrMbeanDiscovery.bat. This file is available in the {EG_INSTALL_DIR}\lib directory of the eG manager host. The MgrMbeanDiscovery.bat file can be used instead of the AgentMbeanDiscovery.bat, only if all the following conditions prevail:

  • The target application should be available on the eG manager host, but the eG manager should not be able to autodiscover the MBeans using the MBean Autodiscovery option discussed earlier;
  • No agent should be available on the eG manager host.
  • No other agent should be able to access the target application.

For instance, you could have a redundant manager setup, where the target Java application executes on a secondary manager host; this host may not have any agent executing on it. Moreover, for security reasons, the firewall could have been configured in such a way that both the primary manager and the eG agents are denied access to the target application.

In such a case, you may first consider auto-discovering the MBeans using the MBean Auto Discovery procedure discussed above. Since this requires access to the eG administrative interface, it cannot be performed from the secondary manager; also, since firewall rules disallow the primary manager-Java application communication, autodiscovery cannot be performed via the primary manager either. Moreover, as no agent has been deployed on the secondary manager host and because the target application is inaccessible to all other agents, the AgentMbeanDiscovery.bat file too cannot be used. In such a case, you can use the MgrMbeanDiscovery.bat on the secondary manager host to load the Mbeans of the application to a file.

Follow the steps below to load the MBeans of the application to a file using the AgentMbeanDiscovery.bat file:

  • Go to the command prompt of the agent host.
  • Switch to the <EG_INSTALL_DIR>\lib directory.
  • To load the MBeans of the javaapp application on to a file, issue the following command at the prompt: AgentMbeanDiscovery.bat
  • Upon execution, the batch file will request you to specify the following:

    <> Enter the Target Host IP:
    Enter the Jmx port:
    Enter the JNDIPath:
    Enter the Username:
    Enter the Password:

    Specify the IP address of the target application, the JMX port at which the application listens, the JNDI lookup name of the JMX connector, and the username and password of the JMX.

  • Based on the information provided, the batch file auto-discovers the MBeans of the application, generates a file of the format MBeans_IpofApplication_JMXPort.txt in the {EG_INSTALL_DIR}\lib directory, and copies the discovered MBeans to the file.
  • Finally, make sure that the file so created is available in the <EG_MANAGER_INSTALL_DIR>\tmp folder on the eG manager host. To achieve this, you can opt for either of the following:

    1. You can quickly upload the file to the <EG_MANAGER_INSTALL_DIR>\tmp on the eG manager host from the eG administrative interface;
    2. You can manually copy the file so created to the <EG_MANAGER_INSTALL_DIR>\tmp directory on the eG manager host;

Note:

The MgrMbeanDiscovery.bat file is to be executed the same way as the AgentMbeanDiscovery.bat. However, the difference in the case of the MgrMbeanDiscovery.bat file is, you need to login to the eG manager host to run the batch file, and the command to be executed is: MgrMbeanDiscovery.bat. Also, since the MBean file will be created in the {EG_MANAGER_INSTALL_DIR}\lib directory, you do not have to once again copy/upload the file to the eG manager host.

If you choose option (a) - i.e., if you choose to upload the file via the eG administrative interface - then follow the procedure discussed in the Uploading an MBean File section to upload the file and to use it for configuring a measure. On the other hand, if you have manually copied the file to the eG manager host (as suggested by option (b)), then, such a file will pre-exist on the eG manager host at the time of measure configuration. To know how to use an existing MBean file for configuring a measure, refer to the Using an Existing MBean File section discussed below.

Uploading an MBean File

  • Select the Upload MBean File option from this page to upload the file to the eG manager host.
  • Next, specify the full path to the MBeans file that was generated previously in the Path of the file text box. To browse for the file path and upload it, click the Upload button available adjacent to the Path of the file text box. Upon doing so, Uploading eGurkha Files pop up window will appear.
  • Click on the Choose File button in this pop up window to browse for the file path, and then click the Upload button therein to upload the file.
  • If the file is successfully uploaded to the eG manager host, a Files Uploaded pop will window will appear with the message “Request has been processed successfully”.
  • Click the Close button in the pop up window to close the window.
  • If a valid MBean file has been uploaded, then the eG Enterprise system will automatically discover the domains from the uploaded file and display the same in the Domain Name list. To proceed with the measure configuration, pick a domain from the list.

    Note:

    If a test reports multiple measures, then the MBeans and/or attribute names mapped to all such measures should belong to the same Domain.

  • Then, click the Configure button to proceed. This will invoke a NEW MEASURE DETAILS page using which the measures for the Jmx test need to be configured.

Using an Existing MBean File

An MBean file may pre-exist in the <EG_MANAGER_INSTALL_DIR>\tmp directory in the eG manager host in the following situations:

  • The MBean file may have been manually copied to the eG manager host;
  • The MBean file may have already been uploaded to the eG manager using steps explained in the Uploading an MBean File section discussed above.
  • The MBean file may have been created using the MgrMbeanDiscovery.bat file (and not the AgentMbeanDiscovery.bat)

To use an existing MBean file to configure a new measure for a JMX test, do the following:

  • Select the Use Existing MBean File option from the ADD MEASURES FOR page. Once this option is chosen, then all the MBean files that pre-exist in the <EG_MANAGER_INSTALL_DIR>\tmp directory in the eG manager host will populate the Path of the file drop-down. From this drop-down, select the file that you want to use for measure configuration.
  • Then, click the Get Domains button to get the domains. The eG Enterprise system will then automatically discover the domains from the chosen file and display the same in the Domain Name list. Pick a domain and and click the Configure button to proceed with the measure configuration. Once the Configure button is clicked, the NEW MEASURE DETAILS page will appear using which the measures for the Jmx test need to be configured.

Manual Entry

Use the Manual Entry method if you know the exact domain, Mbean, and attribute that can report the measure you want, and do not wish to needlessly auto-discover MBeans or load them from a file for this purpose. To opt for this method, choose the Manual Entry option in this page. Doing so will automatically lead you to the NEW MEASURE DETAILS page using which the measures for the Jmx test will have to be configured.

The Back button enables the administrator to go back to the previous screen.