Big sister系统监控
big sister是一套服务器监控程序,可设定监控每台服务器的不同服务(进程、cpu、内存、硬盘等),或同时监
控多台服务器。
1.安装辅助软件snmp和rrdtool
# rpm -ivh /media/cdrom/Server/lm_sensors-2.10.7-4.el5.i386.rpm # rpm -ivh /media/cdrom/Server/net-snmp-5.3.2.2-5.el5.i386.rpm # rpm -ivh rrdtool-1.0.50-3.el4.rf.i386.rpm # rpm -ivh perl-rrdtool-1.0.50-3.el4.rf.i386.rpm 2.安装big-sister # tar zxf big-sister-1.02.tar.gz # cd big-sister-1.02.tar.gz # ./configure --prefix=/usr/local/bs --with-user=root --with-cgi=/usr/local/bs/cgi # make install # make install-agent # make install-modules # make install-server 3.配置bigsister # chmod +w /usr/local/bs/adm/uxmon-net (给它可写的权限) # vi /usr/local/bs/adm/uxmon-net (部分,非全部)DEFAULT community=public frequency=5 perf=5 ALL (每5分钟check一次)
DESCR features=unix,linux localhost (指定要监控的服务器,设置多台在下面添加一行即可)
localhost load memory network cpuload (监控系统内存、网络状态、cpu负载) localhost disk (监控系统硬盘) localhost syslog (监控系统日志状态) localhost proc=sshd procs proc=snmpd procs proc=mysqld procs proc=httpd procs (设定需要监控的进程)
:wq 注意:localhost可以改为本机的计算机名字或ip地址,如监测多台服务器,把localhost改为要添加服务器的名字或IP地址即可
4. 启动bigsister服务 # service snmpd start # chkconfig --add snmpd # chkconfig --level 35 snmpd on # /usr/local/bs/bin/bb_start start 启动服务 # /usr/local/bs/bin/bb_start stop 关闭服务 # /usr/local/bs/bin/bb_start restart 重启服务 或 # ln -s /usr/local/bs/bin/bb_start /sbin/bb_start # bb_start start/stop/restart开机自启动:
# vi /etc/rc.local /usr/local/bs/bin/bb_start start :wq 5. 配置apache # ln -s /usr/local/bs/www /usr/local/apache/htdocs/bs # vi /usr/local/apache/conf/http.conf (任意处添加) include /usr/local/bs/adm/httpd.conf (如果不添加这行,网页alarms,admin,help打不开) :wq重启apache服务
# /usr/local/apache/bin/apachectl restart 6、访问监控页面: