显示标签为“install”的博文。显示所有博文
显示标签为“install”的博文。显示所有博文

2008-02-02

Hyperic HQ 3.2 new features

If you'd like to check out release note, please click here. http://support.hyperic.com/confluence/display/DOC/HQ+3.2+Release+Notes

I had a quick install on RHEL 5. For some features what I saw, I took some screenshots as bellowing. I hope this helps you to understand what's new in 3.2 and save a little bit time for you if you do not wants to install it. I will describe in Chinese.

New Nav menu 新导航菜单

image

导航菜单的名称变成了:Dashboard -- Resources -- Analyze -- Administration 菜单的风格稍微有一点变化。Analyze下面可以进入Alert Center去查看报警信息。我觉得3.2毕竟是一个小的功能增进板,添加了支持MY SQL的支持。增强了对Nagios的集成。对Nagios的集成对它还是很有好处的,由于它自己是Agent Based的监控方法,而Nagios是Agentless的监控方法;集成之后通过它的web界面能统一管理,还是挺好的。不过和Nagios具体能集成到什么程度,我还没有试过。

Currently Down Resources当前宕机资源

image

如果所示:各种有问题的资源安装各种分类都显示出来,同实现时什么时间出的问题,持续了多久,点击放大镜后查看相关的报警信息。上图显示的是:HQ Agent在w2k3vm这一Windows服务器上没有启动的情况,它报告了包括hq agent自身以及所有相关资源的都宕机的情形。同时作为一个监控系统来说,管理员最需要看到的信息可能主要包括两种:1)有那些资源出了问题;2)当前有什么样的告警事件。这里对这两类信息提供了一个非常不错的访问入口。

Live Exec Data实时数据获取

image

HQ-agent本身只能周期性的采集matrix,在汇报给管理服务器。实时的数据采集对排错还是非常有帮助的。此功能我觉得是3.2版中的最好的增强。它应该是远程的让agent去执行一下命令在把最终结果返回到页面上:

  • Cpuinfo CPU信息
  • Cpuperc CPU利用率
  • Df 磁盘利用率
  • Ifconfig 网卡ip信息
  • Netstat 网络端口信息
  • Top
  • Who

这些信息的获取通过agent完成所以和平台无关,即使是Window平台也能收到相同的信息。

HQ Health Check 管理服务器自身检查

image

一个真正的自监控功能最好能做到对相关指标的报警处理。能设置一些条件,在不正常情况发生的时候报告管理员说出管理服务器那里有问题了。上图可以看出,hq已经做出了第一步,能采集并且显示很多HQ服务器运行的状态信息。

Summary:

在3.2的发布说明中还提到它自身的扩展性也很大的增强,这一点对hq来说尤为重要。由于它的结构是基于代理的,当监控的设备和资源都非常多时,hq管理服务器自身的处理能理将会成为瓶颈,如果它的处理,存储和网络上的任何一个环节出现了问题,整个监控系统就失效了。由于事件有限,目前还留下了一些问题:

  • Global Alert Disable是在那里设置的?
  • 报警阀值的设置是否有全局设置的地方?(例如:对所有windows机器都设置一个CPU>80%的阀值)

如果您对以上两个问题有些答案请回复告诉我。关于HQ的其它文章,清在本blog中搜索。

2008-01-30

Build Zenoss 2.1.2 on Redhat Enterprise Linux 5

Well, it is the first time to running a RHEL 5 for me, at same time got zenoss built successfully on it. zenoss-2.1.2 was build from source, the whole process went a while since RHEL is in one of my VMware session; CPU %sy was pretty high during building source code.

Build zenoss-2.1.2

The INSTALL.txt file is good enough, my installation how-to can be really sample:

  • Read INSTALL.txt
  • add zenoss user
  • start mysql
  • upload zenoss tarball to zenoss home directory
  • login as zenoss
  • untar zenoss tarball then run the following, good luck!

-bash-3.1$ ls
appliance_update.sh conf install-functions.sh shared-functions.sh
autoinstall COPYRIGHT.txt install.sh zen2dump.py
build-functions.sh docs INSTALL.txt ZEN2UPGRADE.txt
build-noprompt.sh externallibs libzenoss zensocket
build.sh fs LICENSE.txt zenwipe.sh
CHANGES.txt genpatchdeps.py MacOS
checkall.sh GNUmakefile rpm
-bash-3.1$ ./install.sh

This installer actually builds Zenoss.
For a simpler installation try the VMPlayer Appliance image,
or use RPMs for Redhat based systems.

Building...

Password for the Zenoss "admin" user [zenoss]:
Enter the password again:
MySQL server hostname [localhost]:
MySQL server root username [root]:
MySQL server root password []:
MySQL event database name [events]:
MySQL username for Zenoss events database [zenoss]:
MySQL password for zenoss [zenoss]:
/usr/bin/python2.4 genpatchdeps.py >.patchdeps
installing into //usr/local/zenoss
build log is in zenbuild.log
unpacking Zope-2.8.8-final in build/
configuring build/Zope-2.8.8-final/makefile
installing libzenos/Products.tar.gz
installing libzenos/bin.tar.gz
installing libzenos/extras.tar.gz
mkdir -p //usr/local/zenoss/skel/etc
cp conf/zope.conf.in //usr/local/zenoss/skel/etc/zenoss.conf.in
installing zope
unpacking TwistedSNMP-0.3.13 in build/
patching file snmpprotocol.py
patching file v3/agentproxy.py
patching file v3/agentproxy.py
patching file tableretriever.py
patching file snmpprotocol.py
unpacking pysnmp-3.4.3 in build/
patching file pysnmp/proto/rfc1155.py
patching file pysnmp/proto/rfc1155.py
patching file pysnmp/proto/rfc1155.py
patching file pysnmp/proto/rfc1155.py
installing pysnmp
unpacking Twisted-2.5.0 in build/
patching file TwistedCore-2.5.0/twisted/internet/process.py
Hunk #1 succeeded at 315 (offset -20 lines).
unpacking pycrypto-1.9a6 in build/
installing pycrypto
installing twisted
installing twistedsnmp
making zensocket
gmake[1]: Entering directory `/usr/local/zenoss/zenoss-2.1.2/zensocket'
gcc -o zensocket -Wall -pedantic -D__GNU_LIBRARY__ -g zensocket.c
rm -f //usr/local/zenoss/bin/zensocket
cp zensocket //usr/local/zenoss/bin/zensocket
gmake[1]: Leaving directory `/usr/local/zenoss/zenoss-2.1.2/zensocket'
unpacking pynetsnmp-0.27.0 in build/
unpacking ctypes-1.0.1 in build/
installing ctypes
installing pynetsnmp
unpacking MySQL-python-1.2.0 in build/
patching file setup.py
patching file _mysql.c
Hunk #1 succeeded at 440 (offset -37 lines).
Hunk #3 succeeded at 460 (offset -37 lines).
Hunk #5 succeeded at 526 (offset -37 lines).
installing mysql-python
unpacking rrdtool-1.2.23 in build/
unpacking libart_lgpl-2.3.17 in build/
configuring build/libart_lgpl-2.3.17/Makefile
installing libart
unpacking freetype-2.1.9 in build/
configuring build/freetype-2.1.9/Makefile
installing freetype
unpacking libpng-1.2.8-config in build/
configuring build/libpng-1.2.8-config/Makefile
installing libpng
configuring build/rrdtool-1.2.23/Makefile
installing rrdtool
rm -rf //usr/local/zenoss/share/rrdtool/examples
rm -rf //usr/local/zenoss/lib/perl
unpacking epydoc-3.0beta1 in build/
patching file epydoc/apidoc.py
patching file epydoc/docbuilder.py
patching file epydoc/docintrospecter.py
installing epydoc
unpacking python-snpp-1.1.1 in build/
installing snpp
unpacking Yapps-2.1.1 in build/
installing yapps
unpacking nagios-plugins-1.4.5 in build/
configuring build/nagios-plugins-1.4.5/Makefile
installing nagios
unpacking libsmi-0.4.5 in build/
configuring build/libsmi-0.4.5/Makefile
installing libsmi
unpacking wmi-0.1.5 in build/
unpacking pyip-0.7 in build/
patching file icmp.py
installing pyip
unpacking simplejson-1.4 in build/
cp externallibs/setuptools*.egg build/simplejson-1.4
installing simplejson
installing conf/snmpd.conf
installing conf/zenactions.conf
installing conf/zenbackup.conf
installing conf/zencommand.conf
installing conf/zendisc.conf
installing conf/zeneventlog.conf
installing conf/zenhub.conf
installing conf/zenmib.conf
installing conf/zenmigrate.conf
installing conf/zenmodeler.conf
installing conf/zenpack.conf
installing conf/zenperfsnmp.conf
installing conf/zenping.conf
installing conf/zenprocess.conf
installing conf/zenrender.conf
installing conf/zenstatus.conf
installing conf/zensyslog.conf
installing conf/zentrap.conf
installing conf/zenwin.conf
installing conf/zenwinmodeler.conf
installing conf/zenxevent.conf
installing conf/zope.conf.in
installing conf/hubpasswd
Wrote file /usr/local/zenoss/etc/zeo.conf
Wrote file /usr/local/zenoss/bin/zeoctl
Changed mode for /usr/local/zenoss/bin/zeoctl to 755
Wrote file /usr/local/zenoss/bin/runzeo
Changed mode for /usr/local/zenoss/bin/runzeo to 755
Starting Zope Object Database
. daemon process started, pid=15476
Loading initial Zenoss objects into the Zeo database
(this can take a few minutes)
ZentinelPortal loaded at zport
Starting Zope Server
. daemon process started, pid=15499

=========================================================
zensocket must be setuid. As root, execute the following:
chown root:zenoss /usr/local/zenoss/bin/zensocket
chmod 04750 /usr/local/zenoss/bin/zensocket
=========================================================

Successfully installed Zenoss

Start Daemons:

bash$ $ZENHOME/bin/zenoss start

bash$ $ZENHOME/bin/zenoss status

  • Then I access to Zenoss portal, got this error.

HTTP Status 404 - /zport/dmd


type Status report

message /zport/dmd

description The requested resource (/zport/dmd) is not available.


Apache Tomcat/5.5.20

I reboot the RHEL server, then start mysql and zenoss. Finally, everything goes smoothly. Let's take this nice zenoss portal.

image

On my RHEL, mysql, snmp and python were installed with OS; other packages might installed from zenoss source tarball. I am not sure about this, you could check above to see my install log.

Install tips:

  • Package dependence should be consider before you build Zenoss source code. A full RHEL install is a lazy idea to solve this problem; but it is still the best practice if you are new to both Linux and Zenoss.
  • Start zenoss daemons might take one minute or more. If you access to zenoss portal immediately, you could get a HTTP Status 404 error. Before you see balance stone, please be patience.

Auto-Discovery of Devices

It's time to read ZenossAdminGuide211.pdf; BTW that's a good document. I will go ahead to note down what I did in my testing evn. Please turn to P47, I will go from there. For sure you have something discovered, please read the following tips:

  • The Zenoss machine should have snmp installed, including the following packages:

[root@localhost ~]# rpm -qa|grep snmp
net-snmp-libs-5.3.1-19.el5
net-snmp-5.3.1-19.el5
net-snmp-utils-5.3.1-19.el5
net-snmp-perl-5.3.1-19.el5

As far as I know net-snmp-utils-5.3.1-19.el5 is a necessary. Without this package, you do not have ability to snmpwalk any device via SNMP protocol; in other word you can not get enough information about that remote device.

  • Add a right network ID, here is a example:

ID: 192.168.6.0 --> for 192.168.6.0/24 subnet

  • snmpwalk at least one snmp-enable device, here is a example:

[root@localhost snmp]# snmpwalk -v 1 -c public 192.168.6.131 system
SNMPv2-MIB::sysDescr.0 = STRING: SunOS unknown 5.10 Generic_120012-14 i86pc
SNMPv2-MIB::sysObjectID.0 = OID: NET-SNMP-MIB::netSnmpAgentOIDs.3
DISMAN-EVENT-MIB::sysUpTimeInstance = Timeticks: (146417) 0:24:24.17
SNMPv2-MIB::sysContact.0 = STRING: "System administrator"
SNMPv2-MIB::sysName.0 = STRING: unknown
SNMPv2-MIB::sysLocation.0 = STRING: "System administrators office"
SNMPv2-MIB::sysServices.0 = INTEGER: 72
SNMPv2-MIB::sysORLastChange.0 = Timeticks: (96) 0:00:00.96
SNMPv2-MIB::sysORID.1 = OID: IF-MIB::ifMIB
SNMPv2-MIB::sysORID.2 = OID: SNMPv2-MIB::snmpMIB
SNMPv2-MIB::sysORID.3 = OID: TCP-MIB::tcpMIB
SNMPv2-MIB::sysORID.4 = OID: IP-MIB::ip
SNMPv2-MIB::sysORID.5 = OID: UDP-MIB::udpMIB
SNMPv2-MIB::sysORID.6 = OID: SNMP-VIEW-BASED-ACM-MIB::vacmBasicGroup
SNMPv2-MIB::sysORID.7 = OID: SNMP-FRAMEWORK-MIB::snmpFrameworkMIBCompliance
SNMPv2-MIB::sysORID.8 = OID: SNMP-MPD-MIB::snmpMPDCompliance
SNMPv2-MIB::sysORID.9 = OID: SNMP-USER-BASED-SM-MIB::usmMIBCompliance
SNMPv2-MIB::sysORDescr.1 = STRING: The MIB module to describe generic objects for network interface sub-layers
SNMPv2-MIB::sysORDescr.2 = STRING: The MIB module for SNMPv2 entities
SNMPv2-MIB::sysORDescr.3 = STRING: The MIB module for managing TCP implementations
SNMPv2-MIB::sysORDescr.4 = STRING: The MIB module for managing IP and ICMP implementations
SNMPv2-MIB::sysORDescr.5 = STRING: The MIB module for managing UDP implementations
SNMPv2-MIB::sysORDescr.6 = STRING: View-based Access Control Model for SNMP.
SNMPv2-MIB::sysORDescr.7 = STRING: The SNMP Management Architecture MIB.
SNMPv2-MIB::sysORDescr.8 = STRING: The MIB for Message Processing and Dispatching.
SNMPv2-MIB::sysORDescr.9 = STRING: The management information definitions for the SNMP User-based Security Model.
SNMPv2-MIB::sysORUpTime.1 = Timeticks: (88) 0:00:00.88
SNMPv2-MIB::sysORUpTime.2 = Timeticks: (88) 0:00:00.88
SNMPv2-MIB::sysORUpTime.3 = Timeticks: (88) 0:00:00.88
SNMPv2-MIB::sysORUpTime.4 = Timeticks: (88) 0:00:00.88
SNMPv2-MIB::sysORUpTime.5 = Timeticks: (88) 0:00:00.88
SNMPv2-MIB::sysORUpTime.6 = Timeticks: (90) 0:00:00.90
SNMPv2-MIB::sysORUpTime.7 = Timeticks: (96) 0:00:00.96
SNMPv2-MIB::sysORUpTime.8 = Timeticks: (96) 0:00:00.96
SNMPv2-MIB::sysORUpTime.9 = Timeticks: (96) 0:00:00.96

As you can see here: it is a Solaris 10 system. I just downloaded it last night, get it up and running in another VMWare session on my laptop. You should configure snmp service for Solaris in order to monitoring it via snmp protocol. I will past my /etc/snmp/conf/snmpd.conf below:

# cat snmpd.conf
# Copyright 1988 - 07/17/00 un Microsystems, Inc. All Rights Reserved.
#ident "@(#)snmpd.conf 2.24 00/07/17 SMI"

# See below for file format and supported keywords

sysdescr Sun SNMP Agent,
syscontact System administrator
sysLocation System administrators office
#
system-group-read-community public
#system-group-write-community private
#
read-community public
#write-community private
#
trap 192.168.6.130
trap-community SNMP-trap
#
#kernel-file /vmunix
#
#managers lvs golden
managers 192.168.6.130

192.168.6.130 is Zenoss ip address; you have to restart snmpd daemon after you change something in this file. Here is another tips for Solaris OS. Be default root can not login via ssh or telnet; you have to add another user. You will login as this new user, then su to root.

Let's see what I got after done all of above.

image

image

Zenoss has a pretty good network map, it is a flash map; you can drag things on this map. Before I end this blog, I'd like to summary my questions blow:

  1. Because my RHEL installation is big enough, I don't know what are dependence packages for Zenoss; no time to list all of them. Does have this list?
  2. I've no idea how to configure snmpd on Solaris. What I did was just modified /etc/snmp/conf/snmpd.conf
  3. How to restart snmp daemon for Solaris?
  4. Do you have any good blog about zenoss?

I will write a Chinese blog after this one to conclusion zenoss installation. Please give a hint if you have any comment.

2007-12-13

OpenNMS的Yum的安装方式,安装简单了很多

OpenNMS网站的安装文档:
http://www.opennms.org/index.php/Installation:Yum

下面是我在一个CentOS4的机器上按照上面文档安装的。

  1. 先浏览一下这个页面 http://yum.opennms.org/repofiles/ 找到适合你的OS的那一行。
  2. 我选择安装的是1.3.10-0.8030.snapshot 这是当前开发的最新版本的OpenNMS 运行命令: rpm -Uvh http://yum.opennms.org/repofiles/opennms-repo-snapshot-rhel4.noarch.rpm
  3. 检查是否安装成功, 运行命令: yum list opennms ;我能看到如下输出结果

[root@jng-hkg-48-dyn3328831 ~]# yum list opennms

Repository opennms-stable-common is listed more than once in the configuration

Repository opennms-stable-rhel4 is listed more than once in the configuration

Setting up repositories

Reading repository metadata in from local files

Available Packages

opennms.noarch 1.3.10-0.8030.snapshot opennms-snapshot

  1. 安装这个版本的OpenNMS,运行命令: yum install opennms ; yum会处理包的依赖关系,把需要安装的包都从网络下载并安装上,所以我按y键开始安装,根据网络快慢的情况不同,您需要等待~~

Dependencies Resolved

=============================================================================

Package Arch Version Repository Size

=============================================================================

Installing:

opennms noarch 1.3.10-0.8030.snapshot opennms-snapshot-common 5.0 k

Installing for dependencies:

iplike i386 1.0.6-1 opennms-snapshot-rhel4 10 k

jdk i586 2000:1.5.0_13-fcs opennms-snapshot-common 46 M

jicmp i386 1.0.4-1 opennms-snapshot-rhel4 43 k

opennms-core noarch 1.3.10-0.8030.snapshot opennms-snapshot-common 47 M

opennms-webapp-jetty noarch 1.3.10-0.8030.snapshot opennms-snapshot-common 27 M

postgresql i386 7.4.17-1.RHEL4.1 update 2.0 M

postgresql-server i386 7.4.17-1.RHEL4.1 update 3.0 M

Transaction Summary

=============================================================================

Install 8 Package(s)

Update 0 Package(s)

Remove 0 Package(s)

Total download size: 125 M

Is this ok [y/N]: y

  1. 建立/opt/opennms目录;导出到环境变量 export OPENNMS_HOME=/opt/opennms
  2. 配置数据库;启动数据库,第一次启动之后才能得到相关的配置文件; 运行命令: /sbin/service postgresql start
  3. 修改/var/lib/pgsql/data/pg_hba.conf 文件;内容如下。

local all all trust

host all all 127.0.0.1/32 trust

host all all ::1/128 trust

  1. 修改 /var/lib/pgsql/data/postgresql.conf文件;内容如下

tcpip_socket = true

isten_addresses = 'localhost' (这一行加入了好些数据库启动不了了,去掉就行了,不知原因)

  1. 重新启动数据库服务;运行命令: /sbin/service postgresql restart
  2. 告诉OpenNMS JDK在那里; 运行命令:$OPENNMS_HOME/bin/runjava -S /usr/java/jdk1.5.0_13/bin/java
  3. 初始化OpenNMS的数据库;运行命令:$OPENNMS_HOME/bin/install -disU -l /usr/lib/jni:/usr/lib
  4. 启动OpenNMS;运行命令:/etc/init.d/opennms start
  5. 访问OpenNMS http://ip:8980/opennms 用户名和密码都是admin
  6. 进入管理部门,配置自动发现的ip范围,配置提示邮件。
  7. Enjoy open source software, have fun.

2007-06-21

How to install hyperic-hq on openSuse 10.2

  • Make the hq and group

groupadd hq
useradd -c 'hyperic hq' -d /home/hq -g hq -s /bin/bash hq
mkdir /home/hq
chown -R hq.hq /home/hq

  • Untar installer package and install

cd /home/hq
tar zxf hyperic-hq-installer-3.0.4-389-x86-linux.tgz
chown -R hq.hq .
su hq

hq@Suse:~> cd hyperic-hq-installer/
hq@Suse:~/hyperic-hq-installer> ls
LICENSES.txt agent-3.0.4.tgz installer-3.0.4 server-3.0.4.tgz setup.bat setup.sh shell-3.0.4.tgz
hq@Suse:~/hyperic-hq-installer> ./setup.sh
Unpacking JRE to temporary directory /tmp/jre
Initializing Hyperic HQ 3.0.4 Installation...
Loading taskdefs...
Taskdefs loaded
Choose which software to install:
1: Hyperic HQ Server
2: Hyperic HQ Shell
3: Hyperic HQ Agent
You may enter multiple choices, separated by commas.
1,2,3
HQ server installation path [default '/home/hyperic']:
/home/hq
HQ shell installation path [default '/home/hq']:

HQ agent installation path [default '/home/hq']:

Loading install configuration...
Install configuration loaded.
Preparing to install...
Validating agent install configuration...
Validating shell install configuration...
Validating server install configuration...
Checking server webapp port...
Checking server secure webapp port...
Checking server JRMP port...
Checking server JNP port...
Verifying admin user properties
Validating server DB configuration...
Installing the agent...
Looking for previous installation
Unpacking agent to: /home/hq/agent-3.0.4...
Installing the JRE ...
Unpacking JRE x86-linux-glibc2-jre.tar.gz to: /home/hq/agent-3.0.4...
Setting permissions on agent binaries...
Fixing line endings on text files...
--------------------------------------------------------------------------------
Installation Complete:
Agent successfully installed to: /home/hq/agent-3.0.4
--------------------------------------------------------------------------------

You can now start your HQ agent by running this command:

/home/hq/agent-3.0.4/hq-agent.sh start

Installing the shell...
Unpacking shell to: /home/hq/shell-3.0.4...
Installing the JRE ...
Unpacking JRE x86-linux-glibc2-jre.tar.gz to: /home/hq/shell-3.0.4...
Setting permissions on shell binaries...
Fixing line endings on text files...
--------------------------------------------------------------------------------
Installation Complete:
Command shell successfully installed to: /home/hq/shell-3.0.4
--------------------------------------------------------------------------------
You can now start the HQ shell by running this command:

/home/hq/shell-3.0.4/hq-shell.sh

Installing the server...
Unpacking server to: /home/hq/server-3.0.4...
Creating server configuration files...
Copying binaries and libraries to server installation...
Copying server configuration file...
Copying server control file...
Copying server binaries...
Copying server libs...
Setting up server database...

Now login to another terminal as root and execute this script:

/home/hq/hyperic-hq-installer/installer-3.0.4/data/hqdb/tune-os.sh

This script sets up the proper shared memory settings to run the
built-in database.

Press Enter after you run the script to continue this installation.


Setting up JDBC driver...
Copying database files...
Configuring database...
Starting repopulation of configuration table...
Waiting for built-in database to start (on port 9432)...
Starting built-in database...
Preparing database...
Vacuuming database...
Waiting for server to stop...
Stopping built-in database...
Built-in database stopped.
Installing the JRE ...
Unpacking JRE x86-linux-glibc2-jre.tar.gz to: /home/hq/server-3.0.4...
Setting permissions on server binaries...
Fixing line endings on text files...
--------------------------------------------------------------------------------
Installation Complete:
Server successfully installed to: /home/hq/server-3.0.4
--------------------------------------------------------------------------------


You can now start your HQ server by running this command:

/home/hq/server-3.0.4/bin/hq-server.sh start

Note that the first time the HQ server starts up it may take several minutes
to initialize. Subsequent startups will be much faster.

Once the HQ server reports that it has successfully started, you can log in
to your HQ server at:

http://Suse.opensource.org:7080/
username: hqadmin
password: hqadmin

To change your password, log in to the HQ server, click the "Administration"
link, choose "List Users", then click on the "hqadmin" user.


Setup completed.
A copy of the output shown above has been saved to:
/home/hq/hyperic-hq-installer/installer-3.0.4/hq-install.log

Deleting temporary JRE
hq@Suse:~/hyperic-hq-installer>
hq@Suse:~/hyperic-hq-installer> /home/hq/server-3.0.4/bin/hq-server.sh start
Starting HQ server...
Initializing HQ server configuration...
Checking jboss jndi port...
Checking jboss mbean port...
Starting HQ built-in database...
HQ built-in database started.
Booting the HQ server...
HQ server booted.
Login to HQ at: http://127.0.0.1:7080/
hq@Suse:~/hyperic-hq-installer>

  • Startup a Linux agent

login as: hq
Using keyboard-interactive authentication.
Password:
Have a lot of fun...
hq@Suse:~> pwd
/home/hq
hq@Suse:~> ls
agent-3.0.4 hyperic-hq-installer-3.0.4-389-x86-linux.tgz shell-3.0.4
hyperic-hq-installer server-3.0.4
hq@Suse:~> cd agent-3.0.4/
hq@Suse:~/agent-3.0.4> ls
agent.properties hq-agent.exe jre pdk README.txt
background.bat hq-agent.sh lib product_connectors tmp
background.sh jaas.config log rcfiles
hq@Suse:~/agent-3.0.4> ./hq-agent.sh
Syntax: ./hq-agent.sh
hq@Suse:~/agent-3.0.4> ./hq-agent.sh start
Starting agent
- Unable to load agent token file. Generating a new one ... Done
- Invoking agent
- Starting agent process
Agent successfully started

[ Running agent setup ]
What is the HQ server IP address: 127.0.0.1
Should 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=127.0.0.2]:
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
1182416897800-4295885070579017509-616515886345923858
- Informing agent of new HQ server
- Validating
- Successfully setup agent
hq@Suse:~/agent-3.0.4>

Note: this agent and server are same machine.

  • Access to Web console

http://Ip_address:7080/
default username and password [hqadmin/hqadmin]

2007-06-15

How to install OCSNG 1.0.1 on OpenSuse 10.2

下面我将描述如何安装OCSNG服务器和客户端.服务器的安装在openSuse Linux中,文中将提到Linux和Windows代理的安装方法.最终能在界面中看到两个节点的清单信息,不过只有Linux的哪个会每天更新.

This article is talking about how to install OCSNG 1.0.1 on a openSuSE 10.2 system.
  • Requirements:
You have to meet the following requirements.
 Apache version 1.3.33 or higher / Apache version 2.0.46 or higher.
 Mod_perl version 1.29 or higher.
 Mod_php version 4.3.2 or higher.
 PHP 4.3.2 or higher, with ZIP and GD support enabled.
 PERL 5.6 or higher.
 Perl module XML::Simple version 2.12 or higher.
 Perl module Compress::Zlib version 1.33 or higher.
 Perl module DBI version 1.40 or higher.
 Perl module DBD::Mysql version 2.9004 or higher.
 Perl module Apache::DBI version 0.93 or higher.
 Perl module Net::IP version 1.21 or higher.
 Perl module SOAP::Lite version 0.66 or higher (not mandatory)
 MySQL version 4.1.0 or higher with InnoDB engine active.
 Make utility like GNU make.

If you can use yast for managing package, I believe you could install all of them within 20 minutes. I won't say more about this.

  • Installing Management/communication Server and Web Console
You must have root privileges to setup management server. Login OS as root, then do the following:
1)Download install package from http://nchc.dl.sourceforge.net/sourceforge/ocsinventory/OCSNG_LINUX_SERVER_1.01.tar.gz

2)unpack it
Suse:/mnt/hgfs/win/OCSNG # cp OCSNG_LINUX_SERVER_1.01.tar.gz /root
Suse:/mnt/hgfs/win/OCSNG # cd
Suse:~ # tar zxf OCSNG_LINUX_SERVER_1.01.tar.gz
Suse:~ # cd OCSNG_LINUX_SERVER_1.01/
Suse:~/OCSNG_LINUX_SERVER_1.01 #

3)run installer
Suse:~/OCSNG_LINUX_SERVER_1.01 # sh setup.sh

+----------------------------------------------------------+
| |
| Welcome to OCS Inventory NG Management server setup ! |
| |
+----------------------------------------------------------+

CAUTION: If upgrading Communication server from OCS Inventory NG 1.0 RC2 and
previous, please remove any Apache configuration for Communication Server!

Do you wish to continue ([y]/n)?y
Assuming Communication server 1.0 RC2 or previous is not installed
on this computer.

Starting OCS Inventory NG Management server setup from folder /root/OCSNG_LINUX_SERVER_1.01
Storing log in file /root/OCSNG_LINUX_SERVER_1.01/ocs_server_setup.log

+----------------------------------------------------------+
| Checking for database server properties... |
+----------------------------------------------------------+

Your MySQL client seems to be part of MySQL version 5.0.
Your computer seems to be running MySQL 4.1 or higher, good ;-)

Which host is running database server [localhost] ?
OK, database server is running on host localhost ;-)

On which port is running database server [3306] ?
OK, database server is running on port 3306 ;-)


+----------------------------------------------------------+
| Checking for Apache web server daemon... |
+----------------------------------------------------------+

which: no httpd in (/sbin:/usr/sbin:/usr/local/sbin:/opt/gnome/sbin:/root/bin:/usr/local/bin:/usr/bin:/usr/X11R6/bin:/bin:/usr/games:/opt/gnome/bin:/opt/kde3/bin:/usr/lib/mit/bin:/usr/lib/mit/sbin:/opt/opennms/bin)
which: no apache in (/sbin:/usr/sbin:/usr/local/sbin:/opt/gnome/sbin:/root/bin:/usr/local/bin:/usr/bin:/usr/X11R6/bin:/bin:/usr/games:/opt/gnome/bin:/opt/kde3/bin:/usr/lib/mit/bin:/usr/lib/mit/sbin:/opt/opennms/bin)
which: no apache2 in (/sbin:/usr/sbin:/usr/local/sbin:/opt/gnome/sbin:/root/bin:/usr/local/bin:/usr/bin:/usr/X11R6/bin:/bin:/usr/games:/opt/gnome/bin:/opt/kde3/bin:/usr/lib/mit/bin:/usr/lib/mit/sbin:/opt/opennms/bin)
Where is Apache daemon binary [] ?/usr/sbin/httpd2
OK, using Apache daemon /usr/sbin/httpd2 ;-)

+----------------------------------------------------------+
| Checking for Apache main configuration file... |
+----------------------------------------------------------+

Where is Apache main configuration file [/srv/www//etc/apache2/httpd.conf] ?/etc/apache2/httpd.conf
OK, using Apache main configuration file /etc/apache2/httpd.conf ;-)


+----------------------------------------------------------+
| Checking for Apache user account... |
+----------------------------------------------------------+

Which user account is running Apache web server [] ?wwwrun
OK, Apache is running under user account wwwrun ;-)


+----------------------------------------------------------+
| Checking for Apache group... |
+----------------------------------------------------------+

Which user group is running Apache web server [wwwrun] ?www
OK, Apache is running under users group www ;-)


+----------------------------------------------------------+
| Checking for PERL Interpreter... |
+----------------------------------------------------------+

Found PERL Intrepreter at ;-)
Where is PERL Intrepreter binary [/usr/bin/perl] ?/usr/bin/perl
OK, using PERL Intrepreter /usr/bin/perl ;-)


Do you wish to setup Communication server on this computer ([y]/n)?y


+----------------------------------------------------------+
| Checking for Make utility... |
+----------------------------------------------------------+

OK, Make utility found at ;-)

+----------------------------------------------------------+
| Checking for Apache Include configuration directory... |
+----------------------------------------------------------+

Setup has found Apache Include configuration directory in
.
If you are not using Include directive, please enter 'no'.
Where is Apache Include configuration directory [] ?/etc/apache2/conf.d
OK, Apache Include configuration directory /etc/apache2/conf.d found ;-)

+----------------------------------------------------------+
| Checking for Apache mod_perl version... |
+----------------------------------------------------------+

Checking for Apache mod_perl version 1.99_22 or higher
Found that mod_perl version 1.99_22 or higher is available.
OK, Apache is using mod_perl version 1.99_22 or higher ;-)

+----------------------------------------------------------+
| Checking for Communication server log directory... |
+----------------------------------------------------------+

Communication server can create detailled logs. This logs can be enabled
by setting interger value of LOGLEVEL to 1 in Administration console
menu Configuration.
Where to put Communication server log directory [/var/log/ocsinventory-NG] ?
OK, Communication server will put logs into directory /var/log/ocsinventory-NG ;-)


+----------------------------------------------------------+
| Checking for required Perl Modules... |
+----------------------------------------------------------+

Checking for DBI PERL module...
Found that PERL module DBI is available.
Checking for Apache::DBI PERL module...
Found that PERL module Apache::DBI is available.
Checking for DBD::mysql PERL module...
Found that PERL module DBD::mysql is available.
Checking for Compress::Zlib PERL module...
Found that PERL module Compress::Zlib is available.
Checking for XML::Simple PERL module...
Found that PERL module XML::Simple is available.
Checking for Net::IP PERL module...
Found that PERL module Net::IP is available.
Checking for SOAP::Lite PERL module...
Found that PERL module SOAP::Lite is available.

+----------------------------------------------------------+
| OK, looks good ;-) |
| |
| Configuring Communication server Perl modules... |
+----------------------------------------------------------+

WARNING: INSTALLSITESCRIPT is not a known parameter.
Checking if your kit is complete...
Looks good
'INSTALLSITESCRIPT' is not a known MakeMaker parameter name.
Writing Makefile for Apache::Ocsinventory

+----------------------------------------------------------+
| OK, looks good ;-) |
| |
| Preparing Communication server Perl modules... |
+----------------------------------------------------------+


+----------------------------------------------------------+
| OK, prepare finshed ;-) |
| |
| Installing Communication server Perl modules... |
+----------------------------------------------------------+


+----------------------------------------------------------+
| OK, Communication server Perl modules install finished;-)|
| |
| Creating Communication server log directory... |
+----------------------------------------------------------+

Creating Communication server log directory /var/log/ocsinventory-NG.

Fixing Communication server log directory files permissions.
Configuring logrotate for Communication server.
Writing communication server logrotate to file /etc/logrotate.d/ocsinventory-NG


+----------------------------------------------------------+
| OK, Communication server log directory created ;-) |
| |
| Now configuring Apache web server... |
+----------------------------------------------------------+

Writing communication server configuration to file /etc/apache2/conf.d/ocsinvent

+----------------------------------------------------------+
| OK, Communication server setup sucessfully finished ;-) |
| |
| Please, review /etc/apache2/conf.d/ocsinventory.conf
| to ensure all is good. Then restart Apache daemon. |
+----------------------------------------------------------+


Do you wish to setup Administration server (web administration console)
on this computer ([y]/n)?y

+----------------------------------------------------------+
| Checking for Apache root document directory... |
+----------------------------------------------------------+

Where is Apache root document directory [] ?/srv/www/htdocs
OK, Apache root document directory is /srv/www/htdocs ;-)


+----------------------------------------------------------+
| Checking for required Perl Modules... |
+----------------------------------------------------------+

Checking for DBI PERL module...
Found that PERL module DBI is available.
Checking for DBD::mysql PERL module...
Found that PERL module DBD::mysql is available.
Checking for XML::Simple PERL module...
Found that PERL module XML::Simple is available.
Checking for Net::IP PERL module...
Found that PERL module Net::IP is available.

+----------------------------------------------------------+
| Installing files for Administration server... |
+----------------------------------------------------------+

Creating directory /srv/www/htdocs/download.

Creating directory /srv/www/htdocs/ocsreports.

Copying files to /srv/www/htdocs/ocsreports.

Fixing directories and files permissions.

Configuring IPDISCOVER-UTIL Perl script.

Installing IPDISCOVER-UTIL Perl script.

Fixing permissions on IPDISCOVER-UTIL Perl script.

+----------------------------------------------------------+
| OK, Administration server installation finished ;-) |
| |
| Point your browser to http://server/ocsreports to |
| configure database server and create/update schema. |
+----------------------------------------------------------+


Setup has created a log file /root/OCSNG_LINUX_SERVER_1.01/ocs_server_setup.log. Please, save this file.
If you encounter error while running OCS Inventory NG Management server,
we can ask you to show us his content !

DON'T FORGET TO RESTART APACHE DAEMON !

Enjoy OCS Inventory NG ;-)

Suse:~/OCSNG_LINUX_SERVER_1.01 #
Suse:~/OCSNG_LINUX_SERVER_1.01 # /etc/init.d/apache2 restart
Syntax OK
Shutting down httpd2 (waiting for all children to terminate) done
Starting httpd2 (prefork) done
Suse:~/OCSNG_LINUX_SERVER_1.01 #

As we can see the installation is successful. If you are running a different Linux, you should input other settings.


  • Configuring Management Server
The following is a post-install setup for management server. Y will go through it from a web browser. Open FireFox it is my current favorite browser and point it on URL http://Ip_address/ocsreports

The first warning message should be this.

WARNING: You will not be able to build any auto deployment package with size greater than 2M.
You must raise both post_max_size and upload_max_filesize in your php.ini to correct this.

Do the following to fix it:
# vi php.ini
The default post_max_size is 8M, we are going to increase upload_max_filesize to 12M
; Maximum allowed size for uploaded files.
upload_max_filesize = 12M

We should restart apache to take it effect
Run this command:
/etc/init.d/apache2 restart


Press F5 to refresh the first web page, this warning is still there. Let's just go ahead to input the mysql >
MySql login :
MySql password :
MySql HostName :

root
xxxx
localhost

Click Send button.

There is a text box as the following:

Please enter the label of the windows client tag input box:
(Leave empty if you don't want a popup to be shown on each agent launch).


I'd like to use "Asset ID" for this field. Click 'Submit Query' button to finish it.

Now, you are able to log into web console from http://Ip_address/ocsreports/
Before you input admin/admin , you could use different languages. OCSNG 1.01 support 11 languages.

  • Setting up Agents on openSuse and a Windows Xp client.
Download agent packages from internet.

Installing a Linux agent:
Suse:~ # tar zxf OCSNG_LINUX_AGENT_1.01.tar.gz
Suse:~ # cd OCSNG_LINUX_AGENT_1.01/

Suse:~/OCSNG_LINUX_AGENT_1.01 # sh setup.sh

+----------------------------------------------------------+
| |
| Welcome to OCS Inventory NG Agent setup ! |
| |
+----------------------------------------------------------+
Writing log to file /root/OCSNG_LINUX_AGENT_1.01/ocs_agent_setup.log


+----------------------------------------------------------+
| Checking for previous installation... |
+----------------------------------------------------------+

Previous installation of OCS Inventory NG agent not found

+----------------------------------------------------------+
| Checking for supplied parameters... |
+----------------------------------------------------------+

No parameter found
OCS Inventory NG Agent setup running in user interactive mode


+----------------------------------------------------------+
| Checking for OCS Inventory NG Agent running method... |
+----------------------------------------------------------+

OCS Inventory NG Agent can be run through 2 methods:
- local: inventory will be generated locally to a file, without
interacting with Communication Server. Inventory results
must then be imported manually into the server through
Administration Console.
- http: Agent can connect to Communication Server and will interact
with it to know what is has to do (inventory, ipdiscover,
deployment...)
Which method will you use to generate the inventory ([http]/local) ?
OK, OCS Inventory NG agent will be running in mode ;-)


+----------------------------------------------------------+
| Checking for OCS Inventory NG Communication Server... |
+----------------------------------------------------------+

Which host is running OCS Inventory NG Communication Server [] ?localhost
On which port is running OCS Inventory NG Communication Server [80] ?
OK, OCS Inventory NG Communication Server is running on host
and port <80> ;-)


+----------------------------------------------------------+
| Checking for TAG administrative information value... |
+----------------------------------------------------------+

What is the value of TAG ([]) ?LiuZheng
OK, OCS Inventory NG agent will use as ;-)


+----------------------------------------------------------+
| Checking for PERL Interpreter... |
+----------------------------------------------------------+

OK, PERL Intrepreter found at
;-)


+----------------------------------------------------------+
| Checking for C/C++ Compiler... |
+----------------------------------------------------------+

OK, C/C++ Compiler found at
;-)


+----------------------------------------------------------+
| Checking for Make utility... |
+----------------------------------------------------------+

OK, Make utility found at
;-)


+----------------------------------------------------------+
| Checking for dmidecode binaries... |
+----------------------------------------------------------+

Found dmidecode binaries version <2.8> at
;-)


+----------------------------------------------------------+
| Checking for Compress::Zlib PERL module... |
+----------------------------------------------------------+

OK, PERL module Compress::Zlib is available ;-)


+----------------------------------------------------------+
| Checking for XML::Simple PERL module... |
+----------------------------------------------------------+

OK, PERL module XML::Simple is available ;-)


+----------------------------------------------------------+
| Checking for Net::IP PERL module... |
+----------------------------------------------------------+

OK, PERL module Net::IP is available ;-)


+----------------------------------------------------------+
| Checking for LWP::UserAgent PERL module... |
+----------------------------------------------------------+

OK, PERL module LWP::UserAgent is available ;-)


+----------------------------------------------------------+
| Checking for Digest::MD5 PERL module... |
+----------------------------------------------------------+

OK, PERL module Digest::MD5 is available ;-)


+----------------------------------------------------------+
| Checking for Net::SSLeay PERL module... |
+----------------------------------------------------------+

OK, PERL module Net::SSLeay is available ;-)


+----------------------------------------------------------+
| Installing IPDISCOVER binary... |
+----------------------------------------------------------+

Building IPDISCOVER version 3
Installing IPDISCOVER version 3 into /usr/sbin
OK, IPDISCOVER version 3 setup successfully ;-)


+----------------------------------------------------------+
| Installing OCS Inventory NG Agent... |
+----------------------------------------------------------+

Configuring OCS Inventory NG Agent
Building OCS Inventory NG Agent
Installing OCS Inventory NG Agent
Creating OCS Inventory NG Agent symbolic link
OK, OCS Inventory NG Agent setup successfully ;-)


+----------------------------------------------------------+
| Creating OCS Inventory NG Agent log directory... |
+----------------------------------------------------------+

Creating OCS Inventory NG Agent log directory .
Configuring logrotate for OCS Inventory NG Agent.
Writing OCS Inventory NG Agent logrotate to file


+----------------------------------------------------------+
| Installing OCS Inventory NG Agent configuration files... |
+----------------------------------------------------------+

Creating OCS Inventory NG Agent configuration file
Creating OCS Inventory NG Agent
configuration directory
Writing OCS Inventory NG Agent configuration file
Creating OCS Inventory NG Agent configuration file
Writing OCS Inventory NG Agent
configuration file
OK, OCS Inventory NG Agent configuration files setup successfully ;-)


+----------------------------------------------------------+
| Installing OCS Inventory NG Agent cron configuration... |
+----------------------------------------------------------+

Creating OCS Inventory NG Agent cron configuration file
Writing OCS Inventory NG Agent cron configuration file
OK, OCS Inventory NG Agent cron configuration file setup successfully ;-)


+----------------------------------------------------------+
| Lauching OCS Inventory NG Agent... |
+----------------------------------------------------------+

OK, OCS Inventory NG Agent runs successfully ;-)


Setup has created a log file /root/OCSNG_LINUX_AGENT_1.01/ocs_agent_setup.log. Please, save this file.
If you encounter error while running OCS Inventory NG Agent,
we can ask you to show us his content !

Enjoy OCS Inventory NG ;-)

Suse:~/OCSNG_LINUX_AGENT_1.01 #


The installer will install agent and a cron job on target Linux system. The job will launch OCS Inventory NG Agent once a day under root account, that means a update will get into database every day. Now you will see one single node in the web console.

->Installing a Windows Agent
OCSNG 1.01 does not support Vista yet, so I tested it on Windows Xp/2K/2K3 and it works very well.
You will donwload OCSNG_WIN32_AGENT_1.01_repack.zip
Unzip it and run ocsagent.exe. I'd like to test a standalone version agent, it is not a service version agent.
Double click ocsagent.exe, then you will get a new folder C:\ocs-ng
Create a batch file in this folder.
My scan.bat file as below:
_________________________________________
OCSInventory.exe /server:Ip_Address_of_server /np /tag:"LiuZheng" /hkcu /force

_________________________________________
In order to get inventory scan into database, you will double click scan.bat file. Now, you will get one more node in web console. It is a good idea to copy c:\ocs-ng folder on a USB key. Then you are able to run inventory scan on other Windows machines. If you are going to get update inventory from Windows machines, you have to install OcsAgentSetup.exe agent on them.

If you have any issue please add a comment blow or send me a email. I could help you later if I might have any idea.

OCSNG现在还没有中文的界面,它的代理和服务器端是支持中文的.如果你在一些中文的操作系统上做了清单扫描,扫描的某些信息在Webconsole中查看的结果可能是乱码.这时候,你可以进入浏览器的内码设置,设置成中文后,你会看到正常的中文显示.这说明它是可以支持多语言的.

为了在做资产管理的时候对于用户比较方便,我们可以是用gpli项目. GPLI有中文界面,而且能提供流程支持.GPLI的安装和配置手册待续.

这个安装手册用英文写,如果给您带了了不便请谅解,您有什么问题的话欢迎给我留言,谢谢观看!

2007-06-14

How to install Cacti on OpenSuse 10.2

1.
Download Extract the distribution tarball
Suse:/opt # wget http://www.cacti.net/downloads/cacti-0.8.6j.tar.gz
Suse:/opt # tar zxvf cacti-0.8.6j.tar.gz

2.
Create the MySQL database:
Suse:/opt # mysqladmin --user=root create cacti

3.
Import the default cacti database:
Suse:/opt/cacti-0.8.6j # mysql cacti < user="root"> GRANT ALL ON cacti.* TO cactiuser@localhost IDENTIFIED BY 'cacti';
Query OK, 0 rows affected (0.03 sec)

mysql> flush privileges;
Query OK, 0 rows affected (0.00 sec)

mysql> quite

5.
Edit include/config.php and specify the MySQL user, password and database for your Cacti configuration.

Suse:/opt/cacti-0.8.6j # vi include/config.php
/* make sure these values refect your actual database/host/user/password */
$database_type = "mysql";
$database_default = "cacti";
$database_hostname = "localhost";
$database_username = "cactiuser";
$database_password = "cacti";
$database_port = "3306";

6.
Set the appropriate permissions on cacti's directories for graph/log generation. You should execute these commands from inside cacti's directory to change the permissions.

Suse:/opt # mv cacti-0.8.6j /srv/www/htdocs/cacti
Suse:/opt # useradd cactiuser -d /srv/www/htdocs/cacti

7.
Add a line to your /etc/crontab file similar to:
Suse:/srv/www/htdocs/cacti # vi /etc/crontab
*/5 * * * * cactiuser php /srv/www/htdocs/cacti/poller.php > /dev/null 2>&1

8.
Point your web browser to:
http://10.100.113.138/cacti/index.php

9.
Install cacti patches
Access to http://www.cacti.net/download_patches.php
Be sure that you are in your Cacti directory when you execute these commands.

wget http://www.cacti.net/downloads/patches/0.8.6j/ping_php_version4_snmpgetnext.patch
wget http://www.cacti.net/downloads/patches/0.8.6j/tree_console_missing_hosts.patch
wget http://www.cacti.net/downloads/patches/0.8.6j/thumbnail_graphs_not_working.patch
wget http://www.cacti.net/downloads/patches/0.8.6j/graph_debug_lockup_fix.patch
wget http://www.cacti.net/downloads/patches/0.8.6j/snmpwalk_fix.patch
patch -p1 -N <> 10.
Install cactid
Download Cacti.tar.gz
Suse:/srv/www/htdocs/cacti # wget http://www.cacti.net/downloads/cactid/cacti-cactid-0.8.6i.tar.gz
Suse:/srv/www/htdocs/cacti # tar zxvf cacti-cactid-0.8.6i.tar.gz
Suse:/srv/www/htdocs/cacti # cd cacti-cactid-0.8.6i/
Suse:/srv/www/htdocs/cacti/cacti-cactid-0.8.6i # ./configure
encounter a error:
configure: error: cannot find SNMP headers. Use --with-snmp to specify non-default path.
It seems OpenSuse does not have SNMP headers within installtation DVD. Install cactid latter.


This article is referring Installation Guide for Unix/Linux from cacti.net

2007-05-30

Hyperic HQ小测手记


HQ的网站是一个显的非常商业化的网站;看上去制作的比较精良也比较专业。从HQ的官方文档(好像没找到pdf手册)中看出它能监控的东西还真的非常多,无论是商业的软件还是开源的都有一大串的matrix;他们在被监控的及其上是需要安装和运行代理的。所以从这一点上讲和商业软件也没有什么区别,总之看的数据多应该比较好,不过数据收集的多有时候会给监控对象代理太重的workload。

如何安装
下载HQ\hyperic-hq-installer-3.0.4-389-x86-linux从HQ的网站。这个压缩文件包含:安装程序,服务器端程序(好像包括一个内嵌的PostgreSQL数据库),代理程序,服务期端shell程序,JRE。
BTW:服务器端和代理都是Java程序,如果自己配置好JRE的话可以下载不包含JRE的安装包。Windows上的代理包是一个zip文件,为了方便我都下载的含有JRE的安装包。

由于是纯Java的应用所以服务器端和代理端看似好像都没有任何依赖性要求,只是需要在服务器端安装xorg-x11-libs包,否则不能正常绘图,看不到图形。
在Linux下的安装过程大致如下。
mkdir /opt/hq
useradd hq -G root -d /opt/hq
su hq
tar zxvf hq.tgz
cd hyperic-hq-installer/
./setup.sh
/opt/hq/server-3.0.4/bin/hq-server.sh start
注意最好建立一个新的用户为HQ,服务期端本身需要被非root用户安装和启动。另外代理和服务器端都需要特殊的两个端口通信,所以安装完之后必须停止或者配置防火墙;否则不能访问服务器,服务器也不能和代理通信。启动代理之前需要配置好防火墙。

试用:
总体说HQ的安装和配置都是非常简单的,不过他的Web界面更是简洁。当代理启动了之后,会自动出现在Auto-Discovery下面,点击Add Resource按钮将它变成一个正式的监控对象。默认的情况下,代理会收集一定数量的监控指标;大概是可收集数量的20%左右。当在某个监控对象上(例如Memory Used)设置了收集间隔之后,服务器端就开始了定时的数据收集,所收集的数据默认情况下用折线图的形式展示。可以根据某个指标建立一个告警,告警的逻辑也相当的完整:逻辑判断,巅峰判断,升级处理;看似能想到的都有了。由于是第一次使用展示没有看的如何建立一个告警规则应用于所有监控对象的。我用HQ对我的一个服务器(iis,MS Sql,.net)做了监控,从数据收集和展现效果上来说,真的堪称可与商业软件媲美。

使用结论:
安装简单方便,在Linux下代理端完全无需关照包依赖性。代理配置的安装配置需要一定量的工作,必须配置服务器地址,通信端口等。
代理程序对服务器的工作负担还是比较大的,特别是在启动的那几分钟内。代理进程对CPU的使用率可以达到50~80%,之后就比较低了。对内存的利用一般是30MB左右,当然这应该是可以通过降低收集数的数量和频率来降低的。
用户界面的使用还真的是很方便,还支持告警信息的RSS访问。总之HQ是一个开源软件中的重量级选手:功能强,复杂性高,代理程序负担较重。其他使用小结,待续。

2007-05-13

Install OpenNMS 1.3.2 on OpenSuse 10.2 system (The simplest version )

1>Install dependence packages
zliu3:~yast -i rrdtool
zliu3:~yast -i postgresql
zliu3:~ # rpm -qa |grep rrdtool
rrdtool-1.2.15-25
zliu3:~ # rpm -qa |grep postgresql
postgresql-8.1.5-13
postgresql-libs-8.1.5-13
postgresql-contrib-8.1.5-13
postgresql-pl-8.1.5-15
postgresql-server-8.1.5-13
rcpostgresql start
copy jdk/tomcat 5.5 package files to /opt
cd /opt
tar xzvf jdk1.5.tar.gz
tar xzvf tomcat5.5.tar.gz
export JAVA_HOME=/opt/jdk1.5.0_09
export OPENNMS_HOME=/opt/opennms
export CATALINA_HOME=/opt/apache-tomcat-5.5.20
export PATH=$PATH:$JAVA_HOME/bin
java -version
$CATALINA_HOME/bin/startup.sh
Test Tomcat 5.5 http://Ip_address:8080/
vi /var/lib/pgsql/data/postgresql.conf
# - Connection Settings -
max_connections = 256

vi /var/lib/pgsql/data/pg_hba.conf
[refer to install guide]
#local all all ident sameuser
local all all trust
host all all 127.0.0.1 255.255.255.255 trust
host all all ::1 ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff trust

rcpostgresql restart

2>Install and configure OpenNMS
Copy OpenNMS rpm packages to /root
rpm -ivh opennms*
$OPENNMS_HOME/bin/runjava -s
$OPENNMS_HOME/bin/install -dis
$OPENNMS_HOME/bin/install -y -w $CATALINA_HOME/conf/Catalina/localhost
$CATALINA_HOME/bin/shutdown.sh
$CATALINA_HOME/bin/startup.sh
/etc/init.d/opennms start
/etc/init.d/opennms -v status
OpenNMS.Eventd : running
OpenNMS.Trapd : running
OpenNMS.Dhcpd : running
OpenNMS.Actiond : running
OpenNMS.Capsd : running
OpenNMS.Notifd : running
OpenNMS.Scriptd : running
OpenNMS.Rtcd : running
OpenNMS.Pollerd : running
OpenNMS.PollerBackEnd : running
OpenNMS.Collectd : running
OpenNMS.Threshd : running
OpenNMS.Discovery : running
OpenNMS.Vacuumd : running
OpenNMS.EventTranslator: running
OpenNMS.PassiveStatusd : running

Test OpenNMS login page http://ip_address:8080/opennms

2007-04-26

OpenNMS 安装说明-精简版

Per-install Checklist:

  1. SuSE 10.1 Linux install CD
  2. OpenNMS rpm packages for SuSE Linux
  3. JDK 1.5 package
  4. Tomcat 5.5.20 package

Here we go:

  • Insert install CD into Cd/Dvd rom
  • Do SuSE Linux mini install
  • Logon in OS, run 'yast firewall' to open 8080 tcp port on firewall
  • upload all packages to /opt
  • untar JDK
  • untar Tomcat
  • install postgresql through yast; run 'rcpostgresql start'
  • Export some variables

export JAVA_HOME=/opt/jdk1.5.0_09
export OPENNMS_HOME=/opt/opennms
export CATALINA_HOME=/opt/apache-tomcat-5.5.20
export PATH=$PATH:$JAVA_HOME/bin

  • Test Java and Tomcat

java -version
$CATALINA_HOME/bin/startup.sh

  • Modify this file, vi /var/lib/pgsql/data/pg_hba.conf , then run 'rcpostgresql restart'

#local all all ident sameuser
local all all trus
thost all all 127.0.0.1 255.255.255.255 trust
host all all ::1 ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff trust

  • install OpenNMS rpm packages; rpm -ivh xxx.rpm
  • $OPENNMS_HOME/bin/runjava -s
  • $OPENNMS_HOME/bin/install -dis
  • $OPENNMS_HOME/bin/install -y -w $CATALINA_HOME/conf/Catalina/localhost
  • restart Tomcat
  • start OpenNMS; $OPENNMS_HOME/bin/opennms start
  • Check opennms status; $OPENNMS_HOME/bin/opennms -v status
  • login web console

以上仅仅是我一个偷懒的方法,可以比较快的部署运行OpenNMS。这种方式的好处如下:

  1. Mini安装可以是最快的安装,总共只有几百MB就得到一个Linux操作系统
  2. SuSE的包管理比较好用,配合一张安装DVD,几乎所有软件招之即来,不需要下载任何东西
  3. Java和Tomcat的安装包是从以前的机器上直接把安装目录tar出来的,这也直接解压来用速度比较快。

这个安装方式的缺点:

  1. 并不是最优的安装,没用设置服务的自动重启
  2. 没用优化PostgreSQL
  3. 没用优化Java和Tomcat;ONMS是java应用,性能可能会是个问题
  4. 没用对ONMS做任何配置
  • Post-install Checklist:
    Change Admin password for ONMS
    customize ONMS per your requirements
    optimize Tomcat/Postgresql/ONMS configuration