环境:RHEL 7.1 + Oracle JDK 1.7.0_80 + PostgreSQL 9.1 + JBoss EAP 6.4.0 + JBoss Data Grid 6.5.1
JON Agent 安装在另外一台机器上:192.168.56.102。
首先对操作系统进行环境设置,请参考《安装 JBoss Operations Network 3.3(一) 》 。
(1)设置JON Client 主机名
这一步非常关键,否则 JON Agent 会默认连接 localhost。
hostnamectl set-hostname rhqclient
(2)设置固定 IP 地址
vim /etc/sysconfig/network-scripts/ifcfg-enp0s3
TYPE=Ethernet
BOOTPROTO=static
DEFROUTE=yes
PEERDNS=yes
PEERROUTES=yes
IPV4_FAILURE_FATAL=no
IPV6INIT=yes
IPV6_AUTOCONF=yes
IPV6_DEFROUTE=yes
IPV6_PEERDNS=yes
IPV6_PEERROUTES=yes
IPV6_FAILURE_FATAL=no
NAME=enp0s3
UUID=b31c4642-5f61-4a4e-9eab-7b3279b6c294
DEVICE=enp0s3
ONBOOT=yes
IPADDR=192.168.56.102
GATEWAY=192.168.56.1
NETMASK=255.255.255.0
DNS1=192.168.56.1
(3)设置本地域名解析
vim /etc/hosts
192.168.56.101 rhqserver
192.168.56.102 rhqclient
(4)停止防火墙
接着安装JDK,请参考《安装 JBoss Operations Network 3.3(二) 》。
然后安装配置并启动JBoss EAP 6.4.0 和 JBoss Data Grid 6.5.1,步骤从略。
JON将监控JBoss EAP 和 JBoss Data Grid。
6. 安装 JON Agent
(1)获取JON Agent 介质
通过控制台下载
通过命令行获取
# cd /opt/jbshome/software
# curl http://192.168.56.101:7080/agentupdate/download -o rhq-enterprise-agent-4.12.0.JON330GA.jar
(2)安装 JON Agent
# cd /opt/jbshome
# $JAVA_HOME/bin/java -jar ./software/rhq-enterprise-agent-4.12.0.JON330GA.jar --install=/opt/jbshome/
运行后,输出如下:
ANT target [(default)]
Sat Jan 09 17:35:39 CST 2016
======================================
[header-for-install] [echo]
===== RHQ AGENT INSTALL =====
Installing Agent To: /opt/jbshome/
Version: 4.12.0.JON330GA
Build Number: e347f77
Jar File: /opt/jbshome/software/rhq-enterprise-agent-4.12.0.JON330GA.jar
[install] [echo] Extract the agent distro zip from the agent update binary
[install] [unjar] Expanding: /opt/jbshome/software/rhq-enterprise-agent-4.12.0.JON330GA.jar into /opt/jbshome
[install] [echo] Unzip the agent distro into the new installation directory
[install] [unzip] Expanding: /opt/jbshome/rhq-enterprise-agent-4.12.0.JON330GA.zip into /opt/jbshome
[install] [echo] chmod +x on executables under /opt/jbshome//rhq-agent
[install] [echo] Remove the agent distro zip
[install] [delete] Deleting: /opt/jbshome/rhq-enterprise-agent-4.12.0.JON330GA.zip
[install] [echo] DONE! Agent version 4.12.0.JON330GA (build number=e347f77) has been installed to /opt/jbshome/
(3)安装 JON 补丁
在192.168.56.101上,停止 JON Server
# cd /opt/jbshome/jon-server-3.3.0.GA/bin
# ./rhqctl stop
在192.168.56.101和192.168.56.102上打补丁 update-01
# unzip jon-server-3.3-update-01.zip
# cd /opt/jbshome/software/jon-server-3.3.0.GA-update-01
# ./apply-updates.sh /opt/jbshome/jon-server-3.3.0.GA
# ./apply-updates.sh /opt/jbshome/rhq-agent
在192.168.56.101和192.168.56.102上打补丁 update-02
# unzip jon-server-3.3-update-02.zip
# cd /opt/jbshome/software/jon-server-3.3.0.GA-update-02
# ./apply-updates.sh /opt/jbshome/jon-server-3.3.0.GA
# ./apply-updates.sh /opt/jbshome/rhq-agent
在192.168.56.101和192.168.56.102上打补丁 update-03
# unzip jon-server-3.3-update-03.zip
# cd /opt/jbshome/software/jon-server-3.3.0.GA-update-03
# ./apply-updates.sh /opt/jbshome/jon-server-3.3.0.GA
# ./apply-updates.sh /opt/jbshome/rhq-agent
在192.168.56.101和192.168.56.102上 打补丁 update-04
# unzip jon-server-3.3-update-04.zip
# cd /opt/jbshome/software/jon-server-3.3.0.GA-update-04
# ./apply-updates.sh /opt/jbshome/jon-server-3.3.0.GA
# ./apply-updates.sh /opt/jbshome/rhq-agent
在192.168.56.101和192.168.56.102上 打补丁 update-05
# unzip jon-server-3.3-update-05.zip
# cd /opt/jbshome/software/jon-server-3.3.0.GA-update-05
# ./apply-updates.sh /opt/jbshome/jon-server-3.3.0.GA
# ./apply-updates.sh /opt/jbshome/rhq-agent
(4)配置 JON Agent
在192.168.56.101上,启动 JON Server
# cd /opt/jbshome/jon-server-3.3.0.GA/bin
# ./rhqctl start
在192.168.56.102上,
# cd /opt/jbshome/rhq-agent/bin
# ./rhq-agent.sh
RHQ 4.12.0.JON330GA Update 04 [aa79ebd] (Thu Oct 15 08:19:06 CST 2015)
Answer the following questions to setup this RHQ Agent instance.
- After each prompt, a default value will appear in square brackets.
If you press the ENTER key without providing any value,
the new preference value will be set to that default value.
- If you wish to rely on the system internal default value and
not define any preference value, enter '!*'.
- If you wish to stop before finishing all the questions but still
retain those preferences you already set, enter '!+'.
- If you wish to cancel before finishing all the questions and revert
all preferences back to their original values, enter '!-'.
- If you need help for a particular preference, enter '!?'.
Agent Name [localhost] : 192.168.56.102
Agent Hostname or IP Address [!*] : 192.168.56.102
Agent Port [16163] :
RHQ Server Hostname or IP Address [127.0.0.1] : 192.168.56.101
RHQ Server Port [7080] :
The setup has been completed for the preferences at node [/rhq-agent/default].
The agent is waiting for plugins to be downloaded...
> !!! A server has registered under a loopback address [localhost] - this should only be done for testing and demo purposes. Only agents running on the same machine as that server will be able to interact with that server successfully. Please double check that you really want your server to have a public endpoint of [localhost]. See the Administration (Topology) > Servers menu in the server GUI to change the public endpoint of the server.
> discovery
Apache.Apache HTTP Server: Starting discovery...
Apache.Apache HTTP Server: Done.
Cassandra.Cassandra Node: Starting discovery...
Cassandra.Cassandra Node: Done.
IIS.IIS: Starting discovery...
IIS.IIS: Done.
JBossAS.JBossAS Server: Starting discovery...
JBossAS.JBossAS Server: Done.
JBossAS5.JBossAS Server: Starting discovery...
JBossAS5.JBossAS Server: Done.
JBossAS7.JBossAS7 Host Controller: Starting discovery...
JBossAS7.JBossAS7 Host Controller: Done.
JBossAS7.JBossAS7 Standalone Server: Starting discovery...
JBossAS7.JBossAS7 Standalone Server: Process scan detected a server - scan=[ProcessScan: query=[process|basename|match=^java.*,arg|org.jboss.as.standalone|match=.*], name=[StandaloneAS]], process=[process: pid=[5757], name=[/opt/jbshome/java/jdk1.7.0_80/bin/java], ppid=[5663]]
JBossAS7.JBossAS7 Standalone Server: Process scan detected a server - scan=[ProcessScan: query=[process|basename|match=^java.*,arg|org.jboss.as.standalone|match=.*], name=[StandaloneAS]], process=[process: pid=[5875], name=[/opt/jbshome/java/jdk1.7.0_80/bin/java], ppid=[5844]]
JBossAS7.JBossAS7 Standalone Server: key=[hostConfig: /opt/jbshome/myjdg/configuration/standalone.xml], name=[JDG (192.168.56.102:29990)], version=[JDG 6.5.1.GA], description=[Standalone JBoss Data Grid 6 server]
JBossAS7.JBossAS7 Standalone Server: key=[hostConfig: /opt/jbshome/myeap/configuration/standalone.xml], name=[EAP (192.168.56.102:19990)], version=[EAP 6.4.0.GA], description=[Standalone JBoss Enterprise Application Platform 6 server]
JBossAS7.JBossAS7 Standalone Server: Done.
JMX.JMX Server: Starting discovery...
JMX.JMX Server: Process scan detected a server - scan=[ProcessScan: query=[process|basename|match=^java.*], name=[java]], process=[process: pid=[5757], name=[/opt/jbshome/java/jdk1.7.0_80/bin/java], ppid=[5663]]
JMX.JMX Server: Process scan detected a server - scan=[ProcessScan: query=[process|basename|match=^java.*], name=[java]], process=[process: pid=[5875], name=[/opt/jbshome/java/jdk1.7.0_80/bin/java], ppid=[5844]]
JMX.JMX Server: Process scan detected a server - scan=[ProcessScan: query=[process|basename|match=^java.*], name=[java]], process=[process: pid=[5338], name=[/opt/jbshome/java/jdk1.7.0_80/bin/java], ppid=[3668]]
JMX.JMX Server: Done.
Postgres.Postgres Server: Starting discovery...
Postgres.Postgres Server: Done.
RHQAgent.RHQ Agent: Starting discovery...
RHQAgent.RHQ Agent: key=[RHQ Agent], name=[RHQ Agent], version=[4.12.0.JON330GA], description=[RHQ Management Agent]
RHQAgent.RHQ Agent: Done.
RHQStorage.RHQ Storage Node: Starting discovery...
RHQStorage.RHQ Storage Node: Done.
Script.Script Server: Starting discovery...
Script.Script Server: Done.
> discovery
Apache.Apache HTTP Server: Starting discovery...
Apache.Apache HTTP Server: Done.
Cassandra.Cassandra Node: Starting discovery...
Cassandra.Cassandra Node: Done.
IIS.IIS: Starting discovery...
IIS.IIS: Done.
JBossAS.JBossAS Server: Starting discovery...
JBossAS.JBossAS Server: Done.
JBossAS5.JBossAS Server: Starting discovery...
JBossAS5.JBossAS Server: Done.
JBossAS7.JBossAS7 Host Controller: Starting discovery...
JBossAS7.JBossAS7 Host Controller: Done.
JBossAS7.JBossAS7 Standalone Server: Starting discovery...
JBossAS7.JBossAS7 Standalone Server: Process scan detected a server - scan=[ProcessScan: query=[process|basename|match=^java.*,arg|org.jboss.as.standalone|match=.*], name=[StandaloneAS]], process=[process: pid=[5757], name=[/opt/jbshome/java/jdk1.7.0_80/bin/java], ppid=[5663]]
JBossAS7.JBossAS7 Standalone Server: Process scan detected a server - scan=[ProcessScan: query=[process|basename|match=^java.*,arg|org.jboss.as.standalone|match=.*], name=[StandaloneAS]], process=[process: pid=[5875], name=[/opt/jbshome/java/jdk1.7.0_80/bin/java], ppid=[5844]]
JBossAS7.JBossAS7 Standalone Server: key=[hostConfig: /opt/jbshome/myjdg/configuration/standalone.xml], name=[JDG (192.168.56.102:29990)], version=[JDG 6.5.1.GA], description=[Standalone JBoss Data Grid 6 server]
JBossAS7.JBossAS7 Standalone Server: key=[hostConfig: /opt/jbshome/myeap/configuration/standalone.xml], name=[EAP (192.168.56.102:19990)], version=[EAP 6.4.0.GA], description=[Standalone JBoss Enterprise Application Platform 6 server]
JBossAS7.JBossAS7 Standalone Server: Done.
JMX.JMX Server: Starting discovery...
JMX.JMX Server: Process scan detected a server - scan=[ProcessScan: query=[process|basename|match=^java.*], name=[java]], process=[process: pid=[5757], name=[/opt/jbshome/java/jdk1.7.0_80/bin/java], ppid=[5663]]
JMX.JMX Server: Process scan detected a server - scan=[ProcessScan: query=[process|basename|match=^java.*], name=[java]], process=[process: pid=[5875], name=[/opt/jbshome/java/jdk1.7.0_80/bin/java], ppid=[5844]]
JMX.JMX Server: Process scan detected a server - scan=[ProcessScan: query=[process|basename|match=^java.*], name=[java]], process=[process: pid=[5338], name=[/opt/jbshome/java/jdk1.7.0_80/bin/java], ppid=[3668]]
JMX.JMX Server: Done.
Postgres.Postgres Server: Starting discovery...
Postgres.Postgres Server: Done.
RHQAgent.RHQ Agent: Starting discovery...
RHQAgent.RHQ Agent: key=[RHQ Agent], name=[RHQ Agent], version=[4.12.0.JON330GA], description=[RHQ Management Agent]
RHQAgent.RHQ Agent: Done.
RHQStorage.RHQ Storage Node: Starting discovery...
RHQStorage.RHQ Storage Node: Done.
Script.Script Server: Starting discovery...
Script.Script Server: Done.
> quit
Agent no longer accepting input at prompt.
Shutting down...
The agent will wait for [0] threads to die
Shutdown complete - agent will now exit.
可以看到,输入discovery后,成功发现了JBoss EAP 和 JBoss Data Grid。
(5)从后台启动 JON Agent
# ./rhq-agent-wrapper.sh start
Starting RHQ Agent...
RHQ Agent (pid 8687 ) is ✔running
(6)访问 JON 控制台
JON Agent 安装在另外一台机器上:192.168.56.102。
首先对操作系统进行环境设置,请参考《安装 JBoss Operations Network 3.3(一) 》 。
(1)设置JON Client 主机名
这一步非常关键,否则 JON Agent 会默认连接 localhost。
hostnamectl set-hostname rhqclient
(2)设置固定 IP 地址
vim /etc/sysconfig/network-scripts/ifcfg-enp0s3
TYPE=Ethernet
BOOTPROTO=static
DEFROUTE=yes
PEERDNS=yes
PEERROUTES=yes
IPV4_FAILURE_FATAL=no
IPV6INIT=yes
IPV6_AUTOCONF=yes
IPV6_DEFROUTE=yes
IPV6_PEERDNS=yes
IPV6_PEERROUTES=yes
IPV6_FAILURE_FATAL=no
NAME=enp0s3
UUID=b31c4642-5f61-4a4e-9eab-7b3279b6c294
DEVICE=enp0s3
ONBOOT=yes
IPADDR=192.168.56.102
GATEWAY=192.168.56.1
NETMASK=255.255.255.0
DNS1=192.168.56.1
(3)设置本地域名解析
vim /etc/hosts
192.168.56.101 rhqserver
192.168.56.102 rhqclient
(4)停止防火墙
接着安装JDK,请参考《安装 JBoss Operations Network 3.3(二) 》。
然后安装配置并启动JBoss EAP 6.4.0 和 JBoss Data Grid 6.5.1,步骤从略。
JON将监控JBoss EAP 和 JBoss Data Grid。
6. 安装 JON Agent
(1)获取JON Agent 介质
通过控制台下载
通过命令行获取
# cd /opt/jbshome/software
# curl http://192.168.56.101:7080/agentupdate/download -o rhq-enterprise-agent-4.12.0.JON330GA.jar
(2)安装 JON Agent
# cd /opt/jbshome
# $JAVA_HOME/bin/java -jar ./software/rhq-enterprise-agent-4.12.0.JON330GA.jar --install=/opt/jbshome/
运行后,输出如下:
ANT target [(default)]
Sat Jan 09 17:35:39 CST 2016
======================================
[header-for-install] [echo]
===== RHQ AGENT INSTALL =====
Installing Agent To: /opt/jbshome/
Version: 4.12.0.JON330GA
Build Number: e347f77
Jar File: /opt/jbshome/software/rhq-enterprise-agent-4.12.0.JON330GA.jar
[install] [echo] Extract the agent distro zip from the agent update binary
[install] [unjar] Expanding: /opt/jbshome/software/rhq-enterprise-agent-4.12.0.JON330GA.jar into /opt/jbshome
[install] [echo] Unzip the agent distro into the new installation directory
[install] [unzip] Expanding: /opt/jbshome/rhq-enterprise-agent-4.12.0.JON330GA.zip into /opt/jbshome
[install] [echo] chmod +x on executables under /opt/jbshome//rhq-agent
[install] [echo] Remove the agent distro zip
[install] [delete] Deleting: /opt/jbshome/rhq-enterprise-agent-4.12.0.JON330GA.zip
[install] [echo] DONE! Agent version 4.12.0.JON330GA (build number=e347f77) has been installed to /opt/jbshome/
(3)安装 JON 补丁
在192.168.56.101上,停止 JON Server
# cd /opt/jbshome/jon-server-3.3.0.GA/bin
# ./rhqctl stop
在192.168.56.101和192.168.56.102上打补丁 update-01
# unzip jon-server-3.3-update-01.zip
# cd /opt/jbshome/software/jon-server-3.3.0.GA-update-01
# ./apply-updates.sh /opt/jbshome/jon-server-3.3.0.GA
# ./apply-updates.sh /opt/jbshome/rhq-agent
在192.168.56.101和192.168.56.102上打补丁 update-02
# unzip jon-server-3.3-update-02.zip
# cd /opt/jbshome/software/jon-server-3.3.0.GA-update-02
# ./apply-updates.sh /opt/jbshome/jon-server-3.3.0.GA
# ./apply-updates.sh /opt/jbshome/rhq-agent
在192.168.56.101和192.168.56.102上打补丁 update-03
# unzip jon-server-3.3-update-03.zip
# cd /opt/jbshome/software/jon-server-3.3.0.GA-update-03
# ./apply-updates.sh /opt/jbshome/jon-server-3.3.0.GA
# ./apply-updates.sh /opt/jbshome/rhq-agent
在192.168.56.101和192.168.56.102上 打补丁 update-04
# unzip jon-server-3.3-update-04.zip
# cd /opt/jbshome/software/jon-server-3.3.0.GA-update-04
# ./apply-updates.sh /opt/jbshome/jon-server-3.3.0.GA
# ./apply-updates.sh /opt/jbshome/rhq-agent
在192.168.56.101和192.168.56.102上 打补丁 update-05
# unzip jon-server-3.3-update-05.zip
# cd /opt/jbshome/software/jon-server-3.3.0.GA-update-05
# ./apply-updates.sh /opt/jbshome/jon-server-3.3.0.GA
# ./apply-updates.sh /opt/jbshome/rhq-agent
(4)配置 JON Agent
在192.168.56.101上,启动 JON Server
# cd /opt/jbshome/jon-server-3.3.0.GA/bin
# ./rhqctl start
在192.168.56.102上,
# cd /opt/jbshome/rhq-agent/bin
# ./rhq-agent.sh
RHQ 4.12.0.JON330GA Update 04 [aa79ebd] (Thu Oct 15 08:19:06 CST 2015)
Answer the following questions to setup this RHQ Agent instance.
- After each prompt, a default value will appear in square brackets.
If you press the ENTER key without providing any value,
the new preference value will be set to that default value.
- If you wish to rely on the system internal default value and
not define any preference value, enter '!*'.
- If you wish to stop before finishing all the questions but still
retain those preferences you already set, enter '!+'.
- If you wish to cancel before finishing all the questions and revert
all preferences back to their original values, enter '!-'.
- If you need help for a particular preference, enter '!?'.
Agent Name [localhost] : 192.168.56.102
Agent Hostname or IP Address [!*] : 192.168.56.102
Agent Port [16163] :
RHQ Server Hostname or IP Address [127.0.0.1] : 192.168.56.101
RHQ Server Port [7080] :
The setup has been completed for the preferences at node [/rhq-agent/default].
The agent is waiting for plugins to be downloaded...
> !!! A server has registered under a loopback address [localhost] - this should only be done for testing and demo purposes. Only agents running on the same machine as that server will be able to interact with that server successfully. Please double check that you really want your server to have a public endpoint of [localhost]. See the Administration (Topology) > Servers menu in the server GUI to change the public endpoint of the server.
> discovery
Apache.Apache HTTP Server: Starting discovery...
Apache.Apache HTTP Server: Done.
Cassandra.Cassandra Node: Starting discovery...
Cassandra.Cassandra Node: Done.
IIS.IIS: Starting discovery...
IIS.IIS: Done.
JBossAS.JBossAS Server: Starting discovery...
JBossAS.JBossAS Server: Done.
JBossAS5.JBossAS Server: Starting discovery...
JBossAS5.JBossAS Server: Done.
JBossAS7.JBossAS7 Host Controller: Starting discovery...
JBossAS7.JBossAS7 Host Controller: Done.
JBossAS7.JBossAS7 Standalone Server: Starting discovery...
JBossAS7.JBossAS7 Standalone Server: Process scan detected a server - scan=[ProcessScan: query=[process|basename|match=^java.*,arg|org.jboss.as.standalone|match=.*], name=[StandaloneAS]], process=[process: pid=[5757], name=[/opt/jbshome/java/jdk1.7.0_80/bin/java], ppid=[5663]]
JBossAS7.JBossAS7 Standalone Server: Process scan detected a server - scan=[ProcessScan: query=[process|basename|match=^java.*,arg|org.jboss.as.standalone|match=.*], name=[StandaloneAS]], process=[process: pid=[5875], name=[/opt/jbshome/java/jdk1.7.0_80/bin/java], ppid=[5844]]
JBossAS7.JBossAS7 Standalone Server: key=[hostConfig: /opt/jbshome/myjdg/configuration/standalone.xml], name=[JDG (192.168.56.102:29990)], version=[JDG 6.5.1.GA], description=[Standalone JBoss Data Grid 6 server]
JBossAS7.JBossAS7 Standalone Server: key=[hostConfig: /opt/jbshome/myeap/configuration/standalone.xml], name=[EAP (192.168.56.102:19990)], version=[EAP 6.4.0.GA], description=[Standalone JBoss Enterprise Application Platform 6 server]
JBossAS7.JBossAS7 Standalone Server: Done.
JMX.JMX Server: Starting discovery...
JMX.JMX Server: Process scan detected a server - scan=[ProcessScan: query=[process|basename|match=^java.*], name=[java]], process=[process: pid=[5757], name=[/opt/jbshome/java/jdk1.7.0_80/bin/java], ppid=[5663]]
JMX.JMX Server: Process scan detected a server - scan=[ProcessScan: query=[process|basename|match=^java.*], name=[java]], process=[process: pid=[5875], name=[/opt/jbshome/java/jdk1.7.0_80/bin/java], ppid=[5844]]
JMX.JMX Server: Process scan detected a server - scan=[ProcessScan: query=[process|basename|match=^java.*], name=[java]], process=[process: pid=[5338], name=[/opt/jbshome/java/jdk1.7.0_80/bin/java], ppid=[3668]]
JMX.JMX Server: Done.
Postgres.Postgres Server: Starting discovery...
Postgres.Postgres Server: Done.
RHQAgent.RHQ Agent: Starting discovery...
RHQAgent.RHQ Agent: key=[RHQ Agent], name=[RHQ Agent], version=[4.12.0.JON330GA], description=[RHQ Management Agent]
RHQAgent.RHQ Agent: Done.
RHQStorage.RHQ Storage Node: Starting discovery...
RHQStorage.RHQ Storage Node: Done.
Script.Script Server: Starting discovery...
Script.Script Server: Done.
> discovery
Apache.Apache HTTP Server: Starting discovery...
Apache.Apache HTTP Server: Done.
Cassandra.Cassandra Node: Starting discovery...
Cassandra.Cassandra Node: Done.
IIS.IIS: Starting discovery...
IIS.IIS: Done.
JBossAS.JBossAS Server: Starting discovery...
JBossAS.JBossAS Server: Done.
JBossAS5.JBossAS Server: Starting discovery...
JBossAS5.JBossAS Server: Done.
JBossAS7.JBossAS7 Host Controller: Starting discovery...
JBossAS7.JBossAS7 Host Controller: Done.
JBossAS7.JBossAS7 Standalone Server: Starting discovery...
JBossAS7.JBossAS7 Standalone Server: Process scan detected a server - scan=[ProcessScan: query=[process|basename|match=^java.*,arg|org.jboss.as.standalone|match=.*], name=[StandaloneAS]], process=[process: pid=[5757], name=[/opt/jbshome/java/jdk1.7.0_80/bin/java], ppid=[5663]]
JBossAS7.JBossAS7 Standalone Server: Process scan detected a server - scan=[ProcessScan: query=[process|basename|match=^java.*,arg|org.jboss.as.standalone|match=.*], name=[StandaloneAS]], process=[process: pid=[5875], name=[/opt/jbshome/java/jdk1.7.0_80/bin/java], ppid=[5844]]
JBossAS7.JBossAS7 Standalone Server: key=[hostConfig: /opt/jbshome/myjdg/configuration/standalone.xml], name=[JDG (192.168.56.102:29990)], version=[JDG 6.5.1.GA], description=[Standalone JBoss Data Grid 6 server]
JBossAS7.JBossAS7 Standalone Server: key=[hostConfig: /opt/jbshome/myeap/configuration/standalone.xml], name=[EAP (192.168.56.102:19990)], version=[EAP 6.4.0.GA], description=[Standalone JBoss Enterprise Application Platform 6 server]
JBossAS7.JBossAS7 Standalone Server: Done.
JMX.JMX Server: Starting discovery...
JMX.JMX Server: Process scan detected a server - scan=[ProcessScan: query=[process|basename|match=^java.*], name=[java]], process=[process: pid=[5757], name=[/opt/jbshome/java/jdk1.7.0_80/bin/java], ppid=[5663]]
JMX.JMX Server: Process scan detected a server - scan=[ProcessScan: query=[process|basename|match=^java.*], name=[java]], process=[process: pid=[5875], name=[/opt/jbshome/java/jdk1.7.0_80/bin/java], ppid=[5844]]
JMX.JMX Server: Process scan detected a server - scan=[ProcessScan: query=[process|basename|match=^java.*], name=[java]], process=[process: pid=[5338], name=[/opt/jbshome/java/jdk1.7.0_80/bin/java], ppid=[3668]]
JMX.JMX Server: Done.
Postgres.Postgres Server: Starting discovery...
Postgres.Postgres Server: Done.
RHQAgent.RHQ Agent: Starting discovery...
RHQAgent.RHQ Agent: key=[RHQ Agent], name=[RHQ Agent], version=[4.12.0.JON330GA], description=[RHQ Management Agent]
RHQAgent.RHQ Agent: Done.
RHQStorage.RHQ Storage Node: Starting discovery...
RHQStorage.RHQ Storage Node: Done.
Script.Script Server: Starting discovery...
Script.Script Server: Done.
> quit
Agent no longer accepting input at prompt.
Shutting down...
The agent will wait for [0] threads to die
Shutdown complete - agent will now exit.
可以看到,输入discovery后,成功发现了JBoss EAP 和 JBoss Data Grid。
(5)从后台启动 JON Agent
# ./rhq-agent-wrapper.sh start
Starting RHQ Agent...
RHQ Agent (pid 8687 ) is ✔running
(6)访问 JON 控制台
在Inventory->Discovery Queue中,点击192.168.56.102,会展开所有已发现但没有导入的资源。
勾选中EAP和JDG资源,点击Import。
导入后,点击Servers->Top Level Imports中,可以看到刚导入的资源,但状态为问号?。
点击EAP资源,在Inventory->Connection Settings中,设置EAP管理员口令。
设置成功后,刷新页面,会发现之前的问号?变成了正确的√,说明资源导入和配置正确,可以监控了。
没有评论:
发表评论