这几天我对blog做的做多的工作就是找一个好看的Theme。由于受blogspot的影响,所找到的都是黑色两列的;后来觉得样式还是太花哨了,花哨的外表和化繁为简的思想不相投啊。简单并不意味着丑陋,想想Apple就行了,看看它的产品吧,外观上无不简洁大方。

今天对blog做了一些简化工作:


  1. 对左侧模块的精简,去掉了不需要的模块,把模块标题字数减少。
  2. 删除了所有之前下载的Theme,以后就用Wordpress默认的模板。
  3. 删除了不用的插件,把Google sitemap插件装好。
  4. 导入以前Blogspot里的文章
  5. 删除了站内不需要的文件,数据库和配置。

    keep simple.wordpress默认theme是我唯一只能挑出最少毛病的模板,其他的模板总体来说还是可以的,不过总有至少一个让你不能忍受的缺陷,这也成了删除它的不二理由。

    回归wordpress默认theme让我更加关注在它本身的功能上,让我更专心在内容质量上,同时降低了以后的升级工作量。联系一下开源软件(Open Source Software),OSS也都以简为美,简单而开放让OSS绽放了无限魅力。如果没有wordpress的简单开放,那么就没有全球这么多的bloger天天去网上淘好看的theme和插件了;就不会有这么多的开发人员了,他们的创造使得wordpress魅力绽放。

    OSS基本上都是功能注重型的,开发人员都关注软件的核心功能,OSS的简单开放一定会被人们更加关注。

纪念一下吧~~~从blogger搬到此处,真的非了很多的周折~
本博客介绍:
我曾经有过好多个Blog,其中最喜欢是 http://lzheng.blogspot.com。在这个Blog之前我曾经在chinaunix.net上有过两个blog,一个 okwiner.cublog.cn,后来有专门为OpenNMS新开了一个 opennms.cublog.cn; 其实对这两个blog更新的还是挺多的,特别是第一个CUblog。不过后来,还是觉得google的blog有非常多的功能,就把以前写的好的文章都搬 去blogspot了。目的有二,一来是想用一个功能能强大的blog,二来呢觉得google对自己的blog的搜索一定会更好,通过google可以 能带来更多读者。不过不幸的是去年两会的时候blogspot就被封了,期间偶尔也开放过一两。有一次我还以为真的是有恢复了,一夜没睡觉,更新了 blog的样式准备重新开始继续更新。可是第二天就有访问不了了,其实平时在公司或者在公司的VPN上是可以访问的,由于是走的国外的网络;从blog流 量统计上可以看出,http://lzheng.blogspot.com的访问量是平均大约每天12个,访问者基本上都是从国外和港台地区。不过我觉得我的读者是应该面向国内的,写这个博客的目的还是向国内的中文用户提供开源的信息和技术。所以就申请了自己的域名,购买了一个虚拟机(LAMP),在虚机上安装了wordpress。wordpress和blogspot的内容是可以互相兼容的,把blogspot里的文章导出成xml文件在导入到这个站点当中,这样完成了blog的搬家工程。工程虽然不是很浩大,不过毕竟还是费了一番周折,目的只有一个,以前写的东西有些还是有用的舍不得丢。

以后会把我在开源方面的心得和想法都更新到这个博客上,希望能够为您提供一点点的帮助。在这里呢会对开源技术提供全景式介绍,做的力求比较全面内 容。不过我一直以来呢是做IT管理这个方向的,所以从我的文章分将有70%以上是这方面的内容,30%介绍其他内容。不过您如果有其他任何相关的想法也欢 迎和我探讨。

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 新导航菜单


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

Currently Down Resources当前宕机资源



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

Live Exec Data实时数据获取



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


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

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

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



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

Summary:


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


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

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

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.

很多网络系统管理软件都有Trap管理的功能,在系统的安装和配置过程中;验证系统是否能正常处理Trap是很麻烦的事情。原因有很多,发送trap的设备没有,设备上的snmp没有启用,或者设备都正常,到网管系统的网络可能有防火墙吧snmp给堵住了。

为了方便的测试和配置网络管理监控系统,需要手工生产和验证trap的发送和接收。最近偶然在网上发现了这样几个免费(非OSS软件)软件工具,可以做这件事。

下载的网站是:http://www.ncomtech.com/ 下面吧我所下载和测试的软件做一个小结,希望对您有所帮助:


  • Trap Receiver http://www.trapreceiver.com/ 是一个Windows程序非常小,安装了之后会在windows安装一个服务。程序的启动目录是C:\Program Files\Trap Receiver\TrapRcvr.exe 程序界面非常简单,如下图所示:

    image

    点击configure按钮后可以做一些配置:Action --当收到某些特定的trap是出发邮件、声音等动作;logging--把收到的trap信息按照某种格式记录在文件中;Mibs--导入目标设备的trap文件,让这个接收器能认识到另外的trap格式。还有其他配置信息也非常简单。


  • **TrapGen **http://www.ncomtech.com/trapgen.html 顾名思义-这就是一个手工生产和发送trap的工具,是一个命令行工具。example: trapgen -d 192.168.2.3;上图中的第一条和第三条就是用这个命令发出的trap。欲知详细帮助信息,使用”trapgen -h”
  • I/F Spy http://www.ncomtech.com/ifspy.html 是一个网络接口枚举工具,它通过snmp协议去访问目标设备的IFMIB信息,显示所有IFMIB相关信息。
  • UDP Listen http://www.ncomtech.com/udplisten.html UDP协议的监听程序,是命令行工具,有linux和Solaris版,能用作一个debug工具。
  • Thingy http://www.ncomtech.com/thingy.html是一个Windows下的GUI工具,能帮你监控三个SNMP指标,采集并做大于等于和小于的逻辑判断然后显示不同的信号灯。

    这几个小工具都很小,都能在windows下安装和使用对网络系统监控软件的安装、配置和排错应该有一定的帮助。如果您有什好的小工具也请回复一下本文。