nagios图像(nagiosgraph)(未成)-创新互联

nagios图像(nagiosgraph)(未成)

创新互联公司专注于企业全网整合营销推广、网站重做改版、丰城网站定制设计、自适应品牌网站建设、H5场景定制商城网站制作、集团公司官网建设、外贸网站建设、高端网站制作、响应式网页设计等建站业务,价格优惠性价比高,为丰城等各大城市提供网站开发制作服务。

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

为主机添加小太阳图标

# 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

为单个服务添加小太阳图标

# 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中定义的主机名文件)

注:我做的没有生成主机名文件,没有生成图表,原因还在研究中

另外有需要云服务器可以了解下创新互联scvps.cn,海内外云服务器15元起步,三天无理由+7*72小时售后在线,公司持有idc许可证,提供“云服务器、裸金属服务器、高防服务器、香港服务器、美国服务器、虚拟主机、免备案服务器”等云主机租用服务以及企业上云的综合解决方案,具有“安全稳定、简单易用、服务可用性高、性价比高”等特点与优势,专为企业上云打造定制,能够满足用户丰富、多元化的应用场景需求。

当前标题:nagios图像(nagiosgraph)(未成)-创新互联
本文路径:https://www.cdcxhl.com/article26/docgcg.html

成都网站建设公司_创新互联,为您提供外贸网站建设定制网站营销型网站建设做网站网站改版自适应网站

广告

声明:本网站发布的内容(图片、视频和文字)以用户投稿、用户转载内容为主,如果涉及侵权请尽快告知,我们将会在第一时间删除。文章观点不代表本网站立场,如需处理请联系客服。电话:028-86922220;邮箱:631063699@qq.com。内容未经允许不得转载,或转载时需注明来源: 创新互联

成都做网站