Hyperic HQ 4.5 監控軟件的安裝配置和報警

本文出自:dogdogcom.blog.51cto.com
公司使用的監控系統是Hyperic HQ 4.5,因爲以前沒用過過,週末本身嘗試安裝一次,這樣會深入一點。
Hyperic HQ 4.5能夠監控的東西很是的多。
網上找了半天,竟然沒找到幾個關於這軟件的安裝配置教程,不要說功能詳解了,惟一找到的中文文檔居然要收費。。。。
摸了半天終於配出來了。下面就開始講一下安裝和配置的過程。。

1.首先搭建好LAMP架構
yum install httpd mysql-server

2.配置mysql
進入mysql
 mysql


mysql> create user 'hq'@'localhost' identified by 'hq'; 
mysql> create database HQ;  #這個要注意,要大寫HQ
mysql> grant all on HQ.* to 'hq'@'localhost';


下載服務端和客戶端(這個也是找了半天的--!)

http://ftp2.ie.netbsd.org/mirrors/download.sourceforge.net/pub/sourceforge/h/project/hy/hyperic-hq/Hyperic%204.5.1/Hyperic%204.5.1-GA/

#tar xvf  hyperic-hq-installer-4.5.1-x86-64-linux.tar

#useradd hq
#chown hq:hq cd hyperic-hq-installer-4.5.1        #由於安裝這個不能用ROOT安裝
#mkdir /home/hyperic
#chown hq:hq /home/hyperic  -R                       #後面安裝默認是這個,若是沒有這目錄安裝會失敗。除非你本身自定義。
#su - hq                                                             #切換到hq用戶安裝
#cd hyperic-hq-installer-4.5.1
#./setup -full

 linux

[hq@localhost hyperic-hq-installer-4.5.1]$ ./setup.sh -full Unpacking JRE to temporary directory /tmp/jre  Please ignore references to missing tools.jar  Unable to locate tools.jar. Expected to find it in /tmp/lib/tools.jar  Loading taskdefs...  Taskdefs loaded  Initializing Hyperic HQ 4.5.1 Installation...  Choose which software to install:  1: Hyperic HQ Server  2: Hyperic HQ Agent  You may enter multiple choices, separated by commas.  1 選擇安裝服務器  HQ server installation path [default '/home/hyperic']:   What port should the HQ server's web-based GUI listen on for http communication? [default '7080']:   What port should the HQ server's web-based GUI listen on for secure https communication? [default '7443']:   Enter the base URL for the HQ server's web-based GUI [default 'http://jiankong.dog.com:7080/']:   Enter the email address that HQ will use as the sender for email messages [default 'hqadmin@dog.com']:   Choices:          1: HQ Built-in Database         2: Oracle 10g/11g          3: PostgreSQL          4: MySQL Enterprise / Community Server 5.x  The HQ built-in database is provided for EVALUATION PURPOSES ONLY. For production use, MySQL or Oracle is recommended. What backend database should the HQ server use? [default '1']:4   選擇mysql  Enter the JDBC connection URL for the MySQL Enterprise / Community Server 5.x database [default 'jdbc:mysql://localhost:3306/HQ']:   Enter the username to use to connect to the database:  hq 登錄數據庫的用戶名  Enter the password to use to connect to the database.:   (again):  登錄數據庫的密碼hq  Enter an encryption key to use to encrypt the database password.:  abcdefg   密碼  What should the username be for the initial admin user? [default 'hqadmin']:  登錄監控系統的用戶名默認hqadmin  What should the password be for the initial admin user?:   (again):   輸入密碼  Values do not match  What should the password be for the initial admin user?:   (again):   What should the email address be for the initial admin user? [default 'hqadmin@dog.com']:  默認


 

 

安裝完啓動服務:
# /home/hyperic/server-4.5.1/bin/hq-server.sh start     #這個忘記了使用ROOT仍是hq用戶啓動的,本身試試。

切換到root用戶運行
# netstat -ntl  能夠看到7080端口

這時候,服務器就配置成功了,訪問http://IP:7080 登入剛剛設置的用戶名和密碼就能夠進入了。

-------------------------------------
客戶端設置
tar xvf hyperic-hq-agent-4.5.1-x86-64-linux.tar   下載地址查看上面
cd 解壓目錄 bin 下
[root@localhost bin]# ./hq-agent.sh setup
 web

root@localhost bin]# ./hq-agent.sh setup  [ Running agent setup ]  What is the HQ server IP address: 192.168.1.11  這個是服務器IPShould Agent communications to HQ always be secure [default=no]:   What is the HQ server port     [default=7080]:   - Testing insecure connection ... Success  What is your HQ login [default=hqadmin]:   What is your HQ password:   What IP should HQ use to contact the agent [default=192.168.1.146]:  自動搜出本機IP What port should HQ use to contact the agent [default=2144]:   - Received temporary auth token from agent  - Registering agent with HQ  - HQ gave us the following agent token      1304880316310-7629219473865430919-2070226055442958355  - Informing agent of new HQ server  - Validating  - Successfully setup agent  [root@localhost bin]# ./hq-agent.sh restart


 

好啦,這時候客戶端也啓動了。
等大概30秒咱們在訪問服務器網站http://192.168.1.11:7080 刷新一下
會自動搜出剛剛的客戶端的。
 sql

 
點add 就或者skip 均可以

 數據庫

點Resources -browse 能夠列出添加的客戶端。如上圖:

點進去能夠看到客戶機的狀態,以下圖:

 服務器

-----------------------------------------------------------------------------------

報警

點擊ALERT--configure-new
 架構

 

 

這樣就能夠設置負載大於6就警告

 ide

 

 

添加報警的郵箱。。。要發郵件必須啓動sendmail

建議設置139 或yeah.net郵箱。這兩個都不拒絕沒反響解析的郵件的。其餘例如 yahoo都收不到的。

好啦。其餘的本身摸索,我也是本身摸索了一天搞出來的。有什麼好的發現歡迎留言。
 網站

相關文章
相關標籤/搜索