vCenter Hyperic の HQ Agent を RPM でインストール。(AppHA 関連)

vCenter Hyperic の HQ Agent を RPM でインストール。(AppHA 関連)

これまで、このブログの AppHA 系ポストでは

tar.gz 形式の Hyperic エージェント(HQ Agent)を使っていました。

vSphere AppHA への道。Part 3. Hyperic への VC 登録

vSphere AppHA への道。Part 6. Hyperic エージェントの導入

vSphere AppHA で Linux ゲストの Apache httpd を保護してみる。

しかし、よく見たら MyVMware のダウンロードサイトには RPM もありました。

vCenter-hyperic-agent-5.8.1.EE-1.noarch.rpm

そこで、さっそくインストールしてみようと思います。

インストール先は

今回も、いつもの Red Hat 系 Linux です・・・

[root@vm04 ~]# cat /etc/oracle-release

Oracle Linux Server release 6.5

RPM の情報です。

[root@vm04 ~]# rpm -qpi vCenter-hyperic-agent-5.8.1.EE-1.noarch.rpm

Name        : vCenter-hyperic-agent        Relocations: /opt/hyperic

Version     : 5.8.1.EE                          Vendor: VMware, Inc.

Release     : 1                             Build Date: 2014年02月23日 20時20分26秒

Install Date: (not installed)               Build Host: ubuntu

Group       : Applications/Monitoring       Source RPM: vCenter-hyperic-agent-5.8.1.EE-1.src.rpm

Size        : 75857497                         License: Commercial

Signature   : (none)

URL         : http://www.vmware.com/products/vfabric-hyperic/

Summary     : VMware vCenter Hyperic Agent

Description :

Agent for the vCenter Hyperic HQ systems management system.

この RPM では、下記のような感じでファイルがインストールされます。

HQ Agent は /opt/hyperic ディレクトリ配下にインストールされます。

そして /etc/init.d のスクリプトも用意されていました。

[root@vm04 ~]# rpm -qpl vCenter-hyperic-agent-5.8.1.EE-1.noarch.rpm | head

/etc/init.d/hyperic-hqee-agent

/opt/hyperic/hq-plugins

/opt/hyperic/hyperic-hqee-agent

/opt/hyperic/hyperic-hqee-agent/README.txt

/opt/hyperic/hyperic-hqee-agent/bin

/opt/hyperic/hyperic-hqee-agent/bin/hq-agent.sh

/opt/hyperic/hyperic-hqee-agent/bin/logBundleAgent.bat

/opt/hyperic/hyperic-hqee-agent/bin/logBundleAgent.sh

/opt/hyperic/hyperic-hqee-agent/bundles

/opt/hyperic/hyperic-hqee-agent/bundles/agent-5.8.1

[root@vm04 ~]# rpm -qpl vCenter-hyperic-agent-5.8.1.EE-1.noarch.rpm | tail

/opt/hyperic/hyperic-hqee-agent/wrapper/lib/libwrapper-linux-ppc-64.so

/opt/hyperic/hyperic-hqee-agent/wrapper/lib/libwrapper-linux-x86-32.so

/opt/hyperic/hyperic-hqee-agent/wrapper/lib/libwrapper-linux-x86-64.so

/opt/hyperic/hyperic-hqee-agent/wrapper/lib/license-wrapper.txt

/opt/hyperic/hyperic-hqee-agent/wrapper/lib/wrapper.jar

/opt/hyperic/hyperic-hqee-agent/wrapper/sbin

/opt/hyperic/hyperic-hqee-agent/wrapper/sbin/wrapper-linux-ppc-64

/opt/hyperic/hyperic-hqee-agent/wrapper/sbin/wrapper-linux-x86-32

/opt/hyperic/hyperic-hqee-agent/wrapper/sbin/wrapper-linux-x86-64

/opt/hyperic/hyperic-hqee-agent/wrapper/wrapper-community-license-1.1.txt

インストールしてみます。

[root@vm04 ~]# rpm -ivh vCenter-hyperic-agent-5.8.1.EE-1.noarch.rpm

準備中...                ########################################### [100%]

   1:vCenter-hyperic-agent  ########################################### [100%]

The HQ Agent has successfully been installed, and the service has been

configured to start at boot. Prior to starting the service, be sure to

uncomment and modify the agent.setup values in the agent.properties file in

/opt/hyperic/hyperic-hqee-agent/conf. Instructions for doing so can be found online

at http://support.hyperic.com/display/DOC/Configure+Agent+-+Server+Communication+in+Properties+File.

You will also want to check the sanity of the

HQ_JAVA_HOME setting in the /etc/init.d/hyperic-hqee-agent init script.

[root@vm04 ~]#

インストールすると、chkconfig でも「hyperic-hqee-agent」という名前で登録されます。

[root@vm04 ~]# rpm -qa | grep hyperic

vCenter-hyperic-agent-5.8.1.EE-1.noarch

[root@vm04 ~]# chkconfig --list | grep hq

hyperic-hqee-agent      0:off   1:off   2:on    3:on    4:on    5:on    6:off

エージェントの設定ファイルは下記になります。

/opt/hyperic/hyperic-hqee-agent/conf/agent.properties

今回も、これまで同様に設定ファイルを編集します。

80行目と、199行目の2か所だけ編集しています。

[root@vm04 ~]# cd /opt/hyperic/hyperic-hqee-agent/conf/

[root@vm04 conf]# cp -p agent.properties agent.properties_bk

[root@vm04 conf]# sed -i "s/#agent.setup.acceptUnverifiedCertificate=no/agent.setup.acceptUnverifiedCertificate=yes/" agent.properties

[root@vm04 conf]# sed -i "s/^accept.unverified.certificates=false/accept.unverified.certificates=true/" agent.properties

[root@vm04 conf]# diff agent.properties_bk agent.properties

80c80

< #agent.setup.acceptUnverifiedCertificate=no

---

> agent.setup.acceptUnverifiedCertificate=yes

199c199

< accept.unverified.certificates=false

---

> accept.unverified.certificates=true

デフォルトのままだと、Oracle Linux だと

JAVA_HOME が違って、HQ Agent を起動できません。

[root@vm04 conf]# service hyperic-hqee-agent start

Starting the hyperic agent...

Invalid Java Home detected at /usr/lib/jvm/java-6-openjdk/jre

そこで、起動スクリプト(/etc/init.d/hyperic-hqee-agent)の

JAVA_HOME を編集してしまいます。

[root@vm04 conf]# cd

[root@vm04 ~]# cp -p /etc/init.d/hyperic-hqee-agent hyperic-hqee-agent_bk

[root@vm04 ~]# vi /etc/init.d/hyperic-hqee-agent

[root@vm04 ~]# diff hyperic-hqee-agent_bk /etc/init.d/hyperic-hqee-agent

21c21,22

< export JAVA_HOME=/usr/lib/jvm/java-6-openjdk/jre

---

> #export JAVA_HOME=/usr/lib/jvm/java-6-openjdk/jre

> export JAVA_HOME=/usr/lib/jvm/jre-1.6.0-openjdk.x86_64

起動できました。

初回起動なので、対話形式でエージェント設定をしています。

[root@vm04 ~]# service hyperic-hqee-agent start

Starting the hyperic agent...

Starting HQ Agent...... running (5891).

- No token file found, waiting for Agent to initialize

[ Running agent setup ]

Should Agent communications to HQ be unidirectional [default=no]:

What is the HQ server IP address: 192.168.5.186 ★Hyperic サーバの IP

Should Agent communications to HQ always be secure [default=yes]:

What is the HQ server SSL port [default=7443]:

- Testing secure connection ... Success

What is your HQ login [default=hqadmin]:

What is your HQ password: ★Hyperic のパスワードを入力

What IP should HQ use to contact the agent [default=192.168.5.194]:

What port should HQ use to contact the agent [default=2144]:

- Received temporary auth token from agent

- Registering agent with HQ

The server to agent communication channel is using a self-signed certificate and could not be verified

Are you sure you want to continue connecting? [default=no]: yes

- HQ gave us the following agent token

    1401664631613-5447347474204685215-2001479113554227394

- Informing agent of new HQ server

- Validating

- Successfully setup agent

[root@vm04 ~]#

これで、RPM 版 HQ Agent の導入ができました。

tar.gz ファイルでも、RPM ファイルでも、どちらもインストールは簡単なので、

環境に合わせてなじみのある形式を選択するとよいと思いました。

vSphere AppHA 環境構築全体の流れはこちらからどうぞ・・・

vSphere AppHA への道。Part 1. Hyperic の vApp デプロイ

以上、HQ Agent の RPM インストールでした。

Version history
Revision #:
1 of 1
Last update:
‎06-02-2014 07:59 AM
Updated by: