此内容没有您所选择的语言版本。
22.7. JBoss Operations Network for Library Mode
- initiate and perform installation and configuration operations.
- monitor resources and their metrics.
Procedure 22.3. Install JBoss Operations Network Library Mode Plug-in
Open the JBoss Operations Network Console
- From the JBoss Operations Network console, select .
- Select from the 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 , locate the
InfinispanPluginon your local file system. - Click 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 at the bottom of the screen.
- The
InfinispanPluginwill now appear in the list of installed plug-ins.
Figure 22.3. Scan for Updated Plug-ins.
22.7.2.1. Prerequisites 复制链接链接已复制到粘贴板!
- A correctly configured instance of JBoss Operations Network (JON) 3.2.0 with patch
Update 02or 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.jarfile from the JDK in particular. In the JON agent's environment file (bin/rhq-env.sh), set the value of theRHQ_AGENT_JAVA_HOMEproperty 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 pluginfrom JBoss Operation Networks 3.2.0 with patchUpdate 02or 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.
Procedure 22.4. Add JBoss Data Grid Instances in Library Mode
Import the Platform
- Navigate to the and select from the list on the left of the console.
- Select the platform on which the application is running and click at the bottom of the screen.
Figure 22.4. Import the Platform from the .
Access the Servers on the Platform
- The
jdgPlatform now appears in the Platforms list. - Click on the Platform to access the servers that are running on it.
Figure 22.5. Open the
jdgPlatform to view the list of servers.Import the JMX Server
- From the tab, select .
- Click the button at the bottom of the screen and select the option from the list.
Figure 22.6. Import the JMX Server
Enable JDK Connection Settings
- In the window, specify from the list of options.
Figure 22.7. Select the JDK 5 Template.
Modify the Connector Address
- In the menu, modify the supplied 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:
service:jmx:rmi://127.0.0.1/jndi/rmi://127.0.0.1:7997/jmxrmi
service:jmx:rmi://127.0.0.1/jndi/rmi://127.0.0.1:7997/jmxrmiCopy to Clipboard Copied! Toggle word wrap Toggle overflow 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:-Dcom.sun.management.jmxremote.port=7997 -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false
-Dcom.sun.management.jmxremote.port=7997 -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=falseCopy to Clipboard Copied! Toggle word wrap Toggle overflow - Specify the and information if required.
- Click .
Figure 22.8. Modify the values in the Deployment Options screen.
View Cache Statistics and Operations
- Click to refresh the list of servers.
- The tree in the panel on the left side of the screen contains the 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 tab.
- The view shows statistics and metrics.
- The 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.
Procedure 22.5. 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:JAVA_OPTS="$JAVA_OPTS -Dorg.rhq.resourceKey=MyEAP"
JAVA_OPTS="$JAVA_OPTS -Dorg.rhq.resourceKey=MyEAP"Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Start the JBoss Enterprise Application Platform instance in standalone mode as follows:
$JBOSS_HOME/bin/standalone.sh
$JBOSS_HOME/bin/standalone.shCopy to Clipboard Copied! Toggle word wrap Toggle overflow
Deploy the Red Hat JBoss Data Grid Application
Deploy the WAR file that contains the JBoss Data Grid Library mode application withglobalJmxStatisticsandjmxStatisticsenabled.Run JBoss Operations Network (JON) Discovery
Run thediscovery --fullcommand 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 thediscovery --fullcommand again to discover the new resources.
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).
Procedure 22.6. Monitor an Application Deployed in Domain Mode
Edit the Host Configuration
Edit thedomain/configuration/host.xmlfile to replace theserverelement with the following configuration:Copy to Clipboard Copied! Toggle word wrap Toggle overflow Start JBoss Enterprise Application Platform 6
Start JBoss Enterprise Application Platform 6 in domain mode:$JBOSS_HOME/bin/domain.sh
$JBOSS_HOME/bin/domain.shCopy to Clipboard Copied! Toggle word wrap Toggle overflow Deploy the Red Hat JBoss Data Grid Application
Deploy the WAR file that contains the JBoss Data Grid Library mode application withglobalJmxStatisticsandjmxStatisticsenabled.Run Discovery in JBoss Operations Network (JON)
If required, run thediscovery --fullcommand for the JBoss Operations Network (JON) agent to discover the new resources.
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).