此内容没有您所选择的语言版本。
Chapter 7. Connecting to remote Fuse integrations (standalone distributions)
The Fuse Console uses Jolokia, an agent-based approach to Java Management Extensions (JMX) that requires extra software (an agent) installed on the client. By default, Red Hat Fuse includes a jolokia agent.
With standalone Fuse Console distributions, you can connect to remote integrations that already have a jolokia agent (https://jolokia.org/) running inside them. If the process that you want to connect to does not have a jolokia agent inside, refer to the jolokia documentation (http://jolokia.org/agent.html).
7.1. Unlocking the Fuse Console 复制链接链接已复制到粘贴板!
By default, Jolokia for Fuse 7 standalone (on Apache Karaf} and JBoss EAP) is locked and the Fuse Console is not accessible remotely.
To unlock the Fuse Console for a hostname or IP address other than locahost or 127.0.0.1, follow these steps:
Open the jolokia-access.xml` file in an editor.
On Karaf, the XML file is located in the
$KARAF_HOME/etc
folder.On JBoss EAP, it is located in the
$EAP_HOME/standalone/configuration
folder.Register the hostnames or IP addresses for the Fuse integrations that you want to access with the Fuse console by adding them to the <cors> section.
For example, to access hostname 0.0.0.3 from the Fuse Console, add the
<allow-origin>http://0.0.0.3:*</allow-origin>
line as shown:Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Save the file.
7.2. Allowing connections to remote Fuse instances 复制链接链接已复制到粘贴板!
The Fuse Console’s proxy servlet uses whitelist host protection, with which by default the Fuse Console can only connect to localhost. If you want to connect the Fuse Console to other remote Fuse instances, you need to configure the whitelist as follows:
For Apache Karaf, make the following configuration changes in
etc/system.properties
file:hawtio.proxyWhitelist = localhost, 127.0.0.1, myhost1, myhost2, myhost3
hawtio.proxyWhitelist = localhost, 127.0.0.1, myhost1, myhost2, myhost3
Copy to Clipboard Copied! Toggle word wrap Toggle overflow For JBoss EAP, make the following configuration changes in the
standalone/configuration/standalone-*.xml
file:<property name=hawtio.proxyWhitelist" value="localhost, 127.0.0.1, myhost1, myhost2, myhost3"/>
<property name=hawtio.proxyWhitelist" value="localhost, 127.0.0.1, myhost1, myhost2, myhost3"/>
Copy to Clipboard Copied! Toggle word wrap Toggle overflow For Spring Boot, configure the hawtio.proxyWhitelist system property in the
main()
method of your Spring Boot application:System.setProperty("hawtio.proxyWhitelist", "localhost, 127.0.0.1, myhost1, myhost2, myhost3");
System.setProperty("hawtio.proxyWhitelist", "localhost, 127.0.0.1, myhost1, myhost2, myhost3");
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
7.3. Connecting to a remote Jolokia instance 复制链接链接已复制到粘贴板!
Before you begin, you need to know the host name, port, and path of the jolokia agent to be able to connect.
To connect to a remote Jolokia instance so that you can examine its JVM:
- Click the Connect tab.
Click the Remote tab, and then Add connection.
- Type the Name, Scheme (HTTP or HTTPS), and the hostname.
- Click Test Connection.
- Click Add.
The Fuse Console automatically probes the local network interfaces other than localhost and 127.0.0.1 and adds them to the whitelist. Hence, you do not need to manually register the local machine’s addresses to the whitelist.
7.4. Setting data moving preferences 复制链接链接已复制到粘贴板!
You can change the following Jolokia preferences, for example, if you want to more frequently refresh data that displays in the Fuse Console. Note that increasing the frequency of data updates impacts networking traffic and increases the number of requests made to the server.
- Update rate - The period between polls to Jolokia to fetch JMX data (the default is 5 seconds).
- Maximum depth - The number of levels that Jolokia will marshal an object to JSON on the server side before returning (the default is 7).
- Maximum collection size - The maximum number of elements in an array that Jolokia marshals in a response (the default is 50,000).
To change the values of these settings:
In the upper right of the Fuse Console, click the user icon and then click Preferences.
- Edit the options and then click Close.
7.5. Viewing JVM runtime information 复制链接链接已复制到粘贴板!
To view JVM runtime information, such as system properties, metrics, and threads, click the Runtime tab.