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 xvfhyperic-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
$ ./setup.sh -full Unpacking JRE to temporary directory /tmp/jrePlease ignore references to missing tools.jarUnable to locate tools.jar. Expected to find it in /tmp/lib/tools.jarLoading taskdefs...Taskdefs loadedInitializing Hyperic HQ 4.5.1 Installation...Choose which software to install:1: Hyperic HQ Server2: Hyperic HQ AgentYou may enter multiple choices, separated by commas.1 选择安装服务器HQ server installation path : What port should the HQ server's web-based GUI listen on for http communication? : What port should the HQ server's web-based GUI listen on for secure https communication? : Enter the base URL for the HQ server's web-based GUI : Enter the email address that HQ will use as the sender for email messages : Choices: 1: HQ Built-in Database 2: Oracle 10g/11g 3: PostgreSQL 4: MySQL Enterprise / Community Server 5.xThe 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? :4 选择mysqlEnter the JDBC connection URL for the MySQL Enterprise / Community Server 5.x database : Enter the username to use to connect to the database:hq 登陆数据库的用户名Enter the password to use to connect to the database.: (again):登陆数据库的密码hqEnter an encryption key to use to encrypt the database password.:abcdefg 密码What should the username be for the initial admin user? :登陆监控系统的用户名默认hqadminWhat should the password be for the initial admin user?: (again): 输入密码Values do not matchWhat should the password be for the initial admin user?: (again): What should the email address be for the initial admin user? :默认
安装完启动服务:
# /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 下
# ./hq-agent.sh setup
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 : What is the HQ server port : - Testing insecure connection ... SuccessWhat is your HQ login : What is your HQ password: What IP should HQ use to contact the agent :自动搜出本机IP What port should HQ use to contact the agent : - 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# ./hq-agent.sh restart
好啦,这时候客户端也启动了。
等大概30秒我们在访问服务器网站http://192.168.1.11:7080 刷新一下
会自动搜出刚刚的客户端的。
点add 就或者skip 都可以
点Resources -browse 可以列出添加的客户端。如上图:
点进去可以看到客户机的状态,如下图:
-----------------------------------------------------------------------------------
报警
点击ALERT--configure-new
这样就可以设置负载大于6就警告
添加报警的邮箱。。。要发邮件必须启动sendmail
建议设置139 或yeah.net邮箱。这两个都不拒绝没反响解析的邮件的。其他例如 yahoo都收不到的。
好啦。其他的自己摸索,我也是自己摸索了一天搞出来的。有什么好的发现欢迎留言。
页:
[1]