Big Brother监控安装
生活随笔
收集整理的這篇文章主要介紹了
Big Brother监控安装
小編覺得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.
Big Brother監(jiān)控安裝
系統(tǒng)使用CentOS,BigBrother是一套服務(wù)器監(jiān)控程序,免費(fèi)版本只提供至1.9i。 可設(shè)定監(jiān)控每臺(tái)服務(wù)器的不同服務(wù),可記錄服務(wù)器的存活歷程服務(wù),斷線時(shí)自動(dòng)以E-Mail報(bào)警,方便快速定位故障。 1.安裝所需套件 yum install gcc-c++ yum install httpd 2.下載bb4軟件 mkdir /var/www/html/bb4 cd /var/www/html/bb4 下載bb-1.9i.tar.gz wget http://bb4.org/dnld/bb-1.9i.tar.gz 3.解壓縮bb4 tar -zxvf bb-1.9i.tar.gz tar -xf BBSVR-bb1.9i-btf.tar 4.設(shè)定bb4 adduser bb#建立BB用戶,以便使用此用戶啟動(dòng)BB服務(wù)系統(tǒng) cd /var/www/html/bb4/bb1.9i-btf/install ./bbconfig linux Do you agree to the terms of this license (y/n):y What will be the user ID for BB [bb]:(ENTER) Use FQDN (y/n): [y] What host will be the BBDISPLAY [server]: 192.168.6.1(監(jiān)控主機(jī)的IP) What host will be the BBPAGER [192.168.6.1]:(ENTER) Is this host a BBDISPLAY host (y/n): [y] Is this host a BBPAGER host (y/n): [y] Enter the default e-mail address to send notifications to: [root@server] admin@test.com Enter the base URL for BB [/bb]:(ENTER) Enter CGI directory [/home/www/httpd/cgi-bin]: /var/www/cgi-bin Enter the base URL of the CGI scripts [/cgi-bin]:(ENTER) *** We've noticed that we've set some of the pathnames wrong *** by default here. May we mail a summary of the paths we *** missed back to info@bb4.com so we can update our installs?[y/n]n Enter web server user id [nobody]:apache Enter group name [apache]:(ENTER) 5.安裝bb4 chown -R bb /var/www/html/bb4/bbvar ?/var/www/html/bb4/bb1.9i-btf su - bb cd /var/www/html/bb4/bb1.9i-btf/src make make install (如果make時(shí)出現(xiàn)bbd.c:724: error: invalid storage class for function ‘bbd_timeout’錯(cuò)誤時(shí) vim /var/www/html/bb4/bb1.9i-btf/src/bbd.c 把722行 "static"字串刪掉) 6.編輯bb4監(jiān)控目錄文件bb-hosts cd?../etc# local directory [pwd] should now be /var/www/html/bb4/bb1.9i-btf/etc 由于使用系統(tǒng)不同可能會(huì)有區(qū)別 或/usr/local/bb/bb1.9i-btf/etc ] cp bb-hosts?bb-hosts.bak???# always make a backup of config files, BEFORE editing them vim /var/www/html/bb4/bb1.9i-btf/etc/bb-hosts 范例: xxx.xxx.xxx.xxxthis.host.name ????? # BBDISPLAY BBPAGER BBNET 將this.host.name修改成你監(jiān)控主機(jī)的電腦名稱,否則檢查時(shí)會(huì)出錯(cuò)。 group BB Server 192.168.6.1 bb # BBNET BBDISPLAY BBPAGER http://192.168.6.1/bb(必須在最上行) 192.168.6.2 flash.it.net # BBNET ftp http://flash.it.net/ 192.168.6.3 goth.it.net # BBNET ftp http://goth.it.net/ In the first line, the server is monitoring itself (BBNET), is displaying the results (BBDISPLAY) and will send out alerts (BBPAGER).This is the usual setting for the top line. The subsequent lines indicate the folowing hosts are also to be monitored (BBNET), with details of IPs, Services to be monitored and FQDNs. 7. 檢查錯(cuò)誤項(xiàng)目 ./bbchkcfg.sh - Checks the bbdef*.sh/bbinc*.sh/bbsys.sh source scripts for invalid entries. Follow the screen prompts and fix any errors. ./bbchkhosts.sh - Checks the bb-hosts file for errors. Follow the screen prompts and fix any errors. cd?/var/www/htmlor?? cd?/usr/local/bb chown?-R?bb bb4#給BB安裝目錄賦于BB用戶權(quán)限(其實(shí)前面已經(jīng)給過權(quán)限了) - Change the ownership of all the directories and files in the /bb directory back to the BBUSER 8.目錄轉(zhuǎn)向 Big Brother will actually output the information to an .html file in /usr/local/bb/bb1.9i-btf/www/bb.html To make this accessible to network users, create a symlink to a virtual directory in the Apache tree.. ln?-s?/var/www/html/bb4/bb1.9i-btf/www/?/var/www/html/bb # 將BB目錄轉(zhuǎn)換到APACHE目錄以方便訪問http://IP/bb or? ln?-s?/usr/local/bb/bb1.9i-btf/www?/usr/local/apache/htdocs/bb 9.啟動(dòng)服務(wù) su?bb cd?/var/www/html/bb4/bb1.9i-btfor?cd?/usr/local/bb/bb1.9i-btf ./runbb.sh?start Wait a minute or two for the thing to get started and registering. Welcome to Big Brother It takes between 5 and 10 minutes to collect, process, and to fully render the first status page. When this process is completed, this screen will be replaced by your Big Brother Display. Thank you for choosing Quest Software 10.注意事項(xiàng) 縮短檢查服務(wù)時(shí)間:By default, the system checks the target services once every 300 seconds. To increase the update frequency, edit the runbb.sh file and change the BBSLEEP=60(第244行) for 60 seconds, or as required. To fix any errors or change the servers or services to be checked, edit the main config file as you did above 警告信發(fā)送對(duì)象:/bb/etc/bbwarnrules.cfg gione;;*;;*;*;test@test.com test2@test.com hosts;exhosts;services;exservices;day;time;recipients 開機(jī)啟動(dòng)服務(wù): If you wish to start BB automatically at startup, we suggest the following command in your startup script: su?bb –c "cd /var/www/html/bb4/bb1.9i-btf ./runbb.sh restart" or su?-bb –c "cd /var/www/html/bb4/bb1.9i-btf; ./runbb.sh start" 到此安裝結(jié)束,請(qǐng)?jiān)L問監(jiān)控主機(jī)IP,看下是否安裝成功吧~! Rain_zheng 2011-10-26?
轉(zhuǎn)載于:https://blog.51cto.com/dlnat/698131
總結(jié)
以上是生活随笔為你收集整理的Big Brother监控安装的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: C++实现快速傅里叶变换
- 下一篇: Windows域/域树/域林的简单区别