nagios圖像(nagiosgraph)(未成)
創(chuàng)新互聯(lián)公司專注于企業(yè)全網(wǎng)整合營銷推廣、網(wǎng)站重做改版、豐城網(wǎng)站定制設(shè)計(jì)、自適應(yīng)品牌網(wǎng)站建設(shè)、H5場景定制、商城網(wǎng)站制作、集團(tuán)公司官網(wǎng)建設(shè)、外貿(mào)網(wǎng)站建設(shè)、高端網(wǎng)站制作、響應(yīng)式網(wǎng)頁設(shè)計(jì)等建站業(yè)務(wù),價(jià)格優(yōu)惠性價(jià)比高,為豐城等各大城市提供網(wǎng)站開發(fā)制作服務(wù)。http://cdnetworks-kr-1.dl.sourceforge.net/project/nagiosgraph/nagiosgraph/1.4.4/nagiosgraph-1.4.4.tar.gz
http://apt.sw.be/redhat/el5/en/i386/rpmforge/RPMS/rrdtool-1.2.18-1.el5.rf.i386.rpm (32位)
http://apt.sw.be/redhat/el5/en/i386/rpmforge/RPMS/perl-rrdtool-1.2.18-1.el5.rf.i386.rpm
http://apt.sw.be/redhat/el5/en/x86_64/rpmforge/RPMS/rrdtool-1.2.18-1.el5.rf.x86_64.rpm (64位)
http://apt.sw.be/redhat/el5/en/x86_64/rpmforge/RPMS/perl-rrdtool-1.2.18-1.el5.rf.x86_64.rpm
# rpm -ivh rrdtool-1.2.18-1.el5.rf.i386.rpm
# rpm -ivh perl-rrdtool-1.2.18-1.el5.rf.i386.rpm
#tar zxf nagiosgraph-1.4.4.tar.gz
# cd nagiosgraph-1.4.4
# perl Makefile.PL
# vi install.pl
把所有的www-data改成nobody (web的用戶)
:wq
# make && make install
第一個路徑改為/usr/local/nagios/nagiosgraph其它直接回車
# cd /usr/local/nagios/nagiosgraph/etc
# cp nagiosgraph-apache.conf /usr/local/apache/conf
# vi /usr/local/apache/conf/httpd.conf
Include conf/nagiosgraph-apache.conf
:wq
# service httpd restart
# vi /usr/local/nagios/etc/nagios.cfg
service_perfdata_file=/usr/local/nagios/nagiosgraph/var/perfdata.log
service_perfdata_file_template=$LASTSERVICECHECK$||$HOSTNAME$||$SERVICEDESC$||$SERVICEOUTPUT$||$SERVICEPERFDATA$
service_perfdata_file_mode=a
service_perfdata_file_processing_interval=30
service_perfdata_file_processing_command=process-service-perfdata
process_performance_data=1 (原為0)
:wq
# cp cgi/*.cgi /usr/local/nagios/sbin
# cp bin/insert.pl /usr/local/nagios/libexec
# cp share/nagios/graph.css /usr/local/nagios/share
# cp share/nagiosgraph.js /usr/local/nagios/share
# vi /usr/local/nagios/etc/objects/commands.cfg
# 'process-host-perfdata' command definition
define command{
command_name process-host-perfdata
command_line /usr/local/nagios/libexec/insert.pl
}
# 'process-service-perfdata' command definition
define command{
command_name process-service-perfdata
command_line /usr/local/nagios/libexec/insert.pl
}
:wq
注:要注釋掉原有對process-service-perfdata和process-host-perfdata的定義
# vi /usr/local/nagios/etc/objects/yang.cfg
為主機(jī)添加小太陽圖標(biāo)
# vi /usr/local/nagios/etc/objects/yang.cfg
define host {
use linux-server
host_name yang
address 192.168.1.10
action_url /nagiosgraph/cgi-bin/show.cgi?host=$HOSTNAME$
}
:wq
為單個服務(wù)添加小太陽圖標(biāo)
# vi /usr/local/nagios/etc/objects/yang.cfg
define service {
use generic-service
host_name yang
service_description check_load
check_command check_nrpe!check_load
normal_check_interval 2
action_url /nagiosgraph/cgi-bin/show.cgi?host=$HOSTNAME$&srv=$SERVICEDESC$
}
:wq
重啟nagios
# service nagios restart
# ls /usr/local/nagios/nagiosgraph/var/rrd (看有沒有生成nagios中定義的主機(jī)名文件)
注:我做的沒有生成主機(jī)名文件,沒有生成圖表,原因還在研究中
另外有需要云服務(wù)器可以了解下創(chuàng)新互聯(lián)scvps.cn,海內(nèi)外云服務(wù)器15元起步,三天無理由+7*72小時售后在線,公司持有idc許可證,提供“云服務(wù)器、裸金屬服務(wù)器、高防服務(wù)器、香港服務(wù)器、美國服務(wù)器、虛擬主機(jī)、免備案服務(wù)器”等云主機(jī)租用服務(wù)以及企業(yè)上云的綜合解決方案,具有“安全穩(wěn)定、簡單易用、服務(wù)可用性高、性價(jià)比高”等特點(diǎn)與優(yōu)勢,專為企業(yè)上云打造定制,能夠滿足用戶豐富、多元化的應(yīng)用場景需求。