22.7. JBoss Operations Network for Library Mode In Red Hat JBoss Data Grid's Library mode, the JBoss Operations Network plug-in is used to initiate and perform installation and configuration operations. monitor resources and their metrics. In Library mode, the JBoss Operations Network plug-in uses JMX to obtain metrics and perform operations on an application using the JBoss Data Grid library. 23149%2C+Administration+and+Configuration+Guide-6.628-06-2017+13%3A51%3A02JBoss+Data+Grid+6Documentation6.6.1 Report a bug 22.7.1. Installing the JBoss Operations Network Plug-in (Library Mode) Use the following procedure to install the JBoss Operations Network plug-in for Red Hat JBoss Data Grid's Library mode. Procedure 22.4. Install JBoss Operations Network Library Mode Plug-in Open the JBoss Operations Network Console From the JBoss Operations Network console, select Administration . Select Agent Plugins from the Configuration options on the left side of the console. Figure 22.1. JBoss Operations Network Console for JBoss Data Grid Upload the Library Mode Plug-in Click Browse , locate the InfinispanPlugin on your local file system. Click Upload to add the plug-in to the JBoss Operations Network Server. Figure 22.2. Upload the InfinispanPlugin . Scan for Updates Once the file has successfully uploaded, click Scan For Updates at the bottom of the screen. The InfinispanPlugin will now appear in the list of installed plug-ins. Figure 22.3. Scan for Updated Plug-ins. Report a bug 22.7.2. Monitoring Of JBoss Data Grid Instances in Library Mode 22.7.2.1. Prerequisites The following is a list of common prerequisites for Section 22.7.2.3.1, "Monitor an Application Deployed in Standalone Mode" , Section 22.7.2.3.2, "Monitor an Application Deployed in Domain Mode" and Section 22.7.2.2, "Manually Adding JBoss Data Grid Instances in Library Mode" . A correctly configured instance of JBoss Operations Network (JON) 3.2.0 with patch Update 02 or higher version. A running instance of JON Agent on the server where the application will run. For more information, see Section 22.4, "JBoss Operations Network Agent" An operational instance of the RHQ agent with a full JDK. Ensure that the agent has access to the tools.jar file from the JDK in particular. In the JON agent's environment file ( bin/rhq-env.sh ), set the value of the RHQ_AGENT_JAVA_HOME property to point to a full JDK home. The RHQ agent must have been initiated using the same user as the JBoss Enterprise Application Platform instance. As an example, running the JON agent as a user with root privileges and the JBoss Enterprise Application Platform process under a different user does not work as expected and must be avoided. An installed JON plugin for JBoss Data Grid Library Mode. For more information, see Section 22.7.1, "Installing the JBoss Operations Network Plug-in (Library Mode)" Generic JMX plugin from JBoss Operation Networks 3.2.0 with patch Update 02 or better version in use. A custom application using Red Hat JBoss Data Grid's Library mode with enabled JMX statistics for library mode caches in order to make statistics and monitoring working. For details how to enable JMX statistics for cache instances, see Section 21.4, "Enable JMX for Cache Instances" and to enable JMX for cache managers see Section 21.5, "Enable JMX for CacheManagers" The Java Virtual Machine (JVM) must be configured to expose the JMX MBean Server. For the Oracle/Sun JDK, see http://docs.oracle.com/javase/1.5.0/docs/guide/management/agent.html A correctly added and configured management user for JBoss Enterprise Application Platform. Report a bug 22.7.2.2. Manually Adding JBoss Data Grid Instances in Library Mode To add Red Hat JBoss Data Grid instances to JBoss Operations Network manually, use the following procedure in the JBoss Operations Network interface. Procedure 22.5. Add JBoss Data Grid Instances in Library Mode Import the Platform Navigate to the Inventory and select Discovery Queue from the Resources list on the left of the console. Select the platform on which the application is running and click Import at the bottom of the screen. Figure 22.4. Import the Platform from the Discovery Queue . Access the Servers on the Platform The jdg Platform now appears in the Platforms list. Click on the Platform to access the servers that are running on it. Figure 22.5. Open the jdg Platform to view the list of servers. Import the JMX Server From the Inventory tab, select Child Resources . Click the Import button at the bottom of the screen and select the JMX Server option from the list. Figure 22.6. Import the JMX Server Enable JDK Connection Settings In the Resource Import Wizard window, specify JDK 5 from the list of Connection Settings Template options. Figure 22.7. Select the JDK 5 Template. Modify the Connector Address In the Deployment Options menu, modify the supplied Connector Address with the hostname and JMX port of the process containing the Infinispan Library. Enter the JMX connector address of the new JBoss Data Grid instance you want to monitor. For example: Connector Address: Note The connector address varies depending on the host and the JMX port assigned to the new instance. In this case, instances require the following system properties at start up: Specify the Principal and Credentials information if required. Click Finish . Figure 22.8. Modify the values in the Deployment Options screen. View Cache Statistics and Operations Click Refresh to refresh the list of servers. The JMX Servers tree in the panel on the left side of the screen contains the Infinispan Cache Managers node, which contains the available cache managers. The available cache managers contain the available caches. Select a cache from the available caches to view metrics. Select the Monitoring tab. The Tables view shows statistics and metrics. The Operations tab provides access to the various operations that can be performed on the services. Figure 22.9. Metrics and operational data relayed through JMX is now available in the JBoss Operations Network console. Report a bug 22.7.2.3. Monitor Custom Applications Using Library Mode Deployed On JBoss Enterprise Application Platform 22.7.2.3.1. Monitor an Application Deployed in Standalone Mode Use the following instructions to monitor an application deployed in JBoss Enterprise Application Platform using its standalone mode: Procedure 22.6. Monitor an Application Deployed in Standalone Mode Start the JBoss Enterprise Application Platform Instance Start the JBoss Enterprise Application Platform instance as follows: Enter the following command at the command line or change standalone configuration file ( /bin/standalone.conf ) respectively: Start the JBoss Enterprise Application Platform instance in standalone mode as follows: Deploy the Red Hat JBoss Data Grid Application Deploy the WAR file that contains the JBoss Data Grid Library mode application with globalJmxStatistics and jmxStatistics enabled. Run JBoss Operations Network (JON) Discovery Run the discovery --full command in the JBoss Operations Network (JON) agent. Locate Application Server Process In the JBoss Operations Network (JON) web interface, the JBoss Enterprise Application Platform process is listed as a JMX server. Import the Process Into Inventory Import the process into the JBoss Operations Network (JON) inventory. Optional: Run Discovery Again If required, run the discovery --full command again to discover the new resources. Result The JBoss Data Grid Library mode application is now deployed in JBoss Enterprise Application Platform's standalone mode and can be monitored using the JBoss Operations Network (JON). Report a bug 22.7.2.3.2. Monitor an Application Deployed in Domain Mode Use the following instructions to monitor an application deployed in JBoss Enterprise Application Platform 6 using its domain mode: Procedure 22.7. Monitor an Application Deployed in Domain Mode Edit the Host Configuration Edit the domain/configuration/ host.xml file to replace the server element with the following configuration: Start JBoss Enterprise Application Platform 6 Start JBoss Enterprise Application Platform 6 in domain mode: Deploy the Red Hat JBoss Data Grid Application Deploy the WAR file that contains the JBoss Data Grid Library mode application with globalJmxStatistics and jmxStatistics enabled. Run Discovery in JBoss Operations Network (JON) If required, run the discovery --full command for the JBoss Operations Network (JON) agent to discover the new resources. Result The JBoss Data Grid Library mode application is now deployed in JBoss Enterprise Application Platform's domain mode and can be monitored using the JBoss Operations Network (JON). Report a bug

Commands:
service:jmx:rmi://127.0.0.1/jndi/rmi://127.0.0.1:7997/jmxrmi
-Dcom.sun.management.jmxremote.port=7997 -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false
JAVA_OPTS="USDJAVA_OPTS -Dorg.rhq.resourceKey=MyEAP"
USDJBOSS_HOME/bin/standalone.sh
<servers> <server name="server-one" group="main-server-group"> <jvm name="default"> <jvm-options> <option value="-Dorg.rhq.resourceKey=EAP1"/> </jvm-options> </jvm> </server> <server name="server-two" group="main-server-group" auto-start="true"> <socket-bindings port-offset="150"/> <jvm name="default"> <jvm-options> <option value="-Dorg.rhq.resourceKey=EAP2"/> </jvm-options> </jvm> </server> </servers>
USDJBOSS_HOME/bin/domain.sh