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> 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

 

  
  
  
  
  1. [hq@localhost hyperic-hq-installer-4.5.1]$ ./setup.sh -full 
  2. Unpacking JRE to temporary directory /tmp/jre  
  3. Please ignore references to missing tools.jar  
  4. Unable to locate tools.jar. Expected to find it in /tmp/lib/tools.jar  
  5. Loading taskdefs...  
  6. Taskdefs loaded  
  7. Initializing Hyperic HQ 4.5.1 Installation...  
  8. Choose which software to install:  
  9. 1: Hyperic HQ Server  
  10. 2: Hyperic HQ Agent  
  11. You may enter multiple choices, separated by commas.  
  12. 1 选择安装服务器  
  13. HQ server installation path [default '/home/hyperic']:  
  14.  
  15. What port should the HQ server's web-based GUI listen on for http communication? [default '7080']:  
  16.  
  17. What port should the HQ server's web-based GUI listen on for secure https communication? [default '7443']:  
  18.  
  19. Enter the base URL for the HQ server's web-based GUI [default 'http://jiankong.dog.com:7080/']:  
  20.  
  21. Enter the email address that HQ will use as the sender for email messages [default '[email protected]']:  
  22.  
  23. Choices:  
  24.         1: HQ Built-in Database 
  25.         2: Oracle 10g/11g  
  26.         3: PostgreSQL  
  27.         4: MySQL Enterprise / Community Server 5.x  
  28. The HQ built-in database is provided for EVALUATION PURPOSES ONLYFor production use, MySQL or Oracle is recommended. What backend database should the HQ server use? [default '1']:4   选择mysql  
  29. Enter the JDBC connection URL for the MySQL Enterprise / Community Server 5.x database [default 'jdbc:mysql://localhost:3306/HQ']:  
  30.  
  31. Enter the username to use to connect to the database:  
  32. hq 登陆数据库的用户名  
  33. Enter the password to use to connect to the database.:   
  34. (again):  登陆数据库的密码hq  
  35. Enter an encryption key to use to encrypt the database password.:  
  36. abcdefg   密码  
  37. What should the username be for the initial admin user? [default 'hqadmin']:  
  38. 登陆监控系统的用户名默认hqadmin  
  39. What should the password be for the initial admin user?:   
  40. (again):   输入密码  
  41. Values do not match  
  42. What should the password be for the initial admin user?:   
  43. (again):   
  44. What should the email address be for the initial admin user? [default '[email protected]']:  
  45. 默认 


 

 

安装完启动服务:
# /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
 

  
  
  
  
  1. root@localhost bin]# ./hq-agent.sh setup  
  2. [ Running agent setup ]  
  3. What is the HQ server IP address: 192.168.1.11  这个是服务器IP
  4. Should Agent communications to HQ always be secure [default=no]:   
  5. What is the HQ server port     [default=7080]:   
  6. - Testing insecure connection ... Success  
  7. What is your HQ login [default=hqadmin]:   
  8. What is your HQ password:   
  9. What IP should HQ use to contact the agent [default=192.168.1.146]:  自动搜出本机IP 
  10. What port should HQ use to contact the agent [default=2144]:   
  11. - Received temporary auth token from agent  
  12. - Registering agent with HQ  
  13. - HQ gave us the following agent token  
  14.     1304880316310-7629219473865430919-2070226055442958355  
  15. - Informing agent of new HQ server  
  16. - Validating  
  17. - Successfully setup agent  
  18. [root@localhost bin]# ./hq-agent.sh restart 


 

好啦,这时候客户端也启动了。
等大概30秒我们在访问服务器网站http://192.168.1.11:7080 刷新一下
会自动搜出刚刚的客户端的。
 

 
点add 就或者skip 都可以

 

点Resources -browse 可以列出添加的客户端。如上图:

点进去可以看到客户机的状态,如下图:

 

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

报警

点击ALERT--configure-new
 

 

 

这样就可以设置负载大于6就警告

 

 

 

添加报警的邮箱。。。要发邮件必须启动sendmail

建议设置139 或yeah.net邮箱。这两个都不拒绝没反响解析的邮件的。其他例如 yahoo都收不到的。

好啦。其他的自己摸索,我也是自己摸索了一天搞出来的。有什么好的发现欢迎留言。
 

你可能感兴趣的:(职场,监控,休闲,hyperic,HQ4.5)