真实的国产乱ⅩXXX66竹夫人,五月香六月婷婷激情综合,亚洲日本VA一区二区三区,亚洲精品一区二区三区麻豆

成都創(chuàng)新互聯(lián)網(wǎng)站制作重慶分公司

nagios圖形化界面之三(nagiosgraph)-創(chuàng)新互聯(lián)

如今,監(jiān)控系統(tǒng)是琳瑯滿目,有Nagios、Cacti、Zabbix、Centreon、Munin等,也有系統(tǒng)集成如FAN等。個(gè)人在經(jīng)過(guò)不同監(jiān)控的安裝測(cè)試后,還是比較傾向于Nagios的監(jiān)控,簡(jiǎn)單命令;而且結(jié)合nagios和pnp4nagios等插件可以實(shí)現(xiàn)圖表的功能。

創(chuàng)新互聯(lián)服務(wù)緊隨時(shí)代發(fā)展步伐,進(jìn)行技術(shù)革新和技術(shù)進(jìn)步,經(jīng)過(guò)十余年的發(fā)展和積累,已經(jīng)匯集了一批資深網(wǎng)站策劃師、設(shè)計(jì)師、專(zhuān)業(yè)的網(wǎng)站實(shí)施團(tuán)隊(duì)以及高素質(zhì)售后服務(wù)人員,并且完全形成了一套成熟的業(yè)務(wù)流程,能夠完全依照客戶要求對(duì)網(wǎng)站進(jìn)行做網(wǎng)站、成都做網(wǎng)站、建設(shè)、維護(hù)、更新和改版,實(shí)現(xiàn)客戶網(wǎng)站對(duì)外宣傳展示的首要目的,并為客戶企業(yè)品牌互聯(lián)網(wǎng)化提供全面的解決方案。

  Nagios、Nagiosgraph 使用的是RRDtool工具來(lái)實(shí)現(xiàn)畫(huà)圖的。

1:安裝依賴(lài)

      (1) .  rrdtool  安裝rrdtool-1.4.5.tar.gz

      (2) .  GD的perl模塊

            nagios 圖形化界面之三 (nagiosgraph)

     GD模塊依賴(lài)于gd-devel等開(kāi)發(fā)包。

2:  解壓安裝nagiosgraph-1.4.4.tar.gz


      tar  zxvf nagiosgraph-1.4.4.tar.gz

      cd  nagiosgraph-1.4.4

    以下都是在nagiosgraph-1.4.4目錄下完成的,安裝前檢測(cè)安裝環(huán)境


[root@localhostnagiosgraph-1.4.4]# perl install.pl--check-prereq

checking required PERL modules

Carp...1.20

CGI... ***FAIL***

Data::Dumper...2.130_02

File::Basename...2.82

File::Find...1.19

MIME::Base64...3.13

POSIX...1.24

RRDs...1.4004

Time::HiRes...1.972101

checking optional PERL modules

GD...***FAIL***

checking nagios installation

found nagios at /usr/local/nagios/bin/nagios

checking web server installation

found apache at /usr/sbin/httpd

*** one or more problems were detected!


以上是我的結(jié)果,錯(cuò)誤是perl的cgi模塊沒(méi)有安裝

使用yum 安裝,如下

yum install perl-CGI

重新檢驗(yàn)

perl install.pl --check-prereq

結(jié)果就正確了

安裝

perl install.pl//安裝命令

出現(xiàn)的結(jié)果如下,注意后面最好不要一路回車(chē),自己多注意一下都是什么要求


checking required PERL modules

Carp...1.20

CGI...3.52

Data::Dumper...2.130_02

File::Basename...2.82

File::Find...1.19

MIME::Base64...3.13

POSIX...1.24

RRDs...1.4004

Time::HiRes...1.972101

checking optional PERL modules

GD...2.44

checking nagios installation

found nagios at /usr/local/nagios/bin/nagios

checking web server installation

found apache at /usr/sbin/httpd

Destination directory (prefix)?[/usr/local/nagiosgraph] /usr/local/nagios/nagiosgraph//此處是nagiosgraph的目錄,這個(gè)可以自己選擇一下

Location of configuration files (etc-dir)?[/usr/local/nagios/nagiosgraph/etc]

Location of executables?[/usr/local/nagios/nagiosgraph/bin]

Location of CGI scripts?[/usr/local/nagios/nagiosgraph/cgi]

Location of documentation (doc-dir)?[/usr/local/nagios/nagiosgraph/doc]

Location of examples?[/usr/local/nagios/nagiosgraph/examples]

Location of CSS and JavaScript files?[/usr/local/nagios/nagiosgraph/share]

Location of utilities?[/usr/local/nagios/nagiosgraph/util]

Location of state files (var-dir)?[/usr/local/nagios/nagiosgraph/var]

Location of RRD files?[/usr/local/nagios/nagiosgraph/var/rrd]

Location of log files (log-dir)?[/usr/local/nagios/nagiosgraph/var]

Path of log file?[/usr/local/nagios/nagiosgraph/var/nagiosgraph.log]

Path of CGI log file?[/usr/local/nagios/nagiosgraph/var/nagiosgraph-cgi.log]

URL of CGI scripts? [/nagiosgraph/cgi-bin]

URL of CSS file?[/nagiosgraph/nagiosgraph.css]

URL of JavaScript file?[/nagiosgraph/nagiosgraph.js]

Path of Nagios performance data file?[/tmp/perfdata.log]

URL of Nagios CGI scripts?[/nagios/cgi-bin]

username or userid of Nagios user? [nagios]//此處注意你選擇的用戶

username or userid of web server user? [apache]nagios////此處注意你選擇的用戶

Modify the Nagios configuration? [n]

Modify the Apache configuration? [n]

configuration:

ng_layoutstandalone

ng_prefix/usr/local/nagios/nagiosgraph

ng_etc_dir/usr/local/nagios/nagiosgraph/etc

ng_bin_dir/usr/local/nagios/nagiosgraph/bin

ng_cgi_dir/usr/local/nagios/nagiosgraph/cgi

ng_doc_dir/usr/local/nagios/nagiosgraph/doc

ng_examples_dir/usr/local/nagios/nagiosgraph/examples

ng_www_dir/usr/local/nagios/nagiosgraph/share

ng_util_dir/usr/local/nagios/nagiosgraph/util

ng_var_dir/usr/local/nagios/nagiosgraph/var

ng_rrd_dir/usr/local/nagios/nagiosgraph/var/rrd

ng_log_dir/usr/local/nagios/nagiosgraph/var

ng_log_file/usr/local/nagios/nagiosgraph/var/nagiosgraph.log

ng_cgilog_file/usr/local/nagios/nagiosgraph/var/nagiosgraph-cgi.log

ng_url/nagiosgraph

ng_cgi_url/nagiosgraph/cgi-bin

ng_css_url/nagiosgraph/nagiosgraph.css

ng_js_url/nagiosgraph/nagiosgraph.js

nagios_cgi_url/nagios/cgi-bin

nagios_perfdata_file /tmp/perfdata.log

nagios_usernagios

www_usernagios

modify_nagios_config n

nagios_config_file

nagios_commands_file

modify_apache_config n

apache_config_dir

apache_config_file

Continue with this configuration? [y]

mkdir /usr/local/nagios/nagiosgraph

mkdir /usr/local/nagios/nagiosgraph/etc

copy etc/nagiosgraph.conf to/usr/local/nagios/nagiosgraph/etc/nagiosgraph.conf

copy etc/access.conf to/usr/local/nagios/nagiosgraph/etc/access.conf

copy etc/nagiosgraph_fr.conf to/usr/local/nagios/nagiosgraph/etc/nagiosgraph_fr.conf

copy etc/servdb.conf to/usr/local/nagios/nagiosgraph/etc/servdb.conf

copy etc/nagiosgraph_es.conf to/usr/local/nagios/nagiosgraph/etc/nagiosgraph_es.conf

copy etc/hostdb.conf to/usr/local/nagios/nagiosgraph/etc/hostdb.conf

copy etc/groupdb.conf to/usr/local/nagios/nagiosgraph/etc/groupdb.conf

copy etc/nagiosgraph_de.conf to/usr/local/nagios/nagiosgraph/etc/nagiosgraph_de.conf

copy etc/datasetdb.conf to/usr/local/nagios/nagiosgraph/etc/datasetdb.conf

copy etc/labels.conf to/usr/local/nagios/nagiosgraph/etc/labels.conf

copy etc/rrdopts.conf to/usr/local/nagios/nagiosgraph/etc/rrdopts.conf

copy etc/map to/usr/local/nagios/nagiosgraph/etc/map

copy etc/ngshared.pm to/usr/local/nagios/nagiosgraph/etc

replace text in/usr/local/nagios/nagiosgraph/etc/nagiosgraph.conf

move/usr/local/nagios/nagiosgraph/etc/nagiosgraph.conf-bak to/usr/local/nagios/nagiosgraph/etc/nagiosgraph.conf

replace text in/usr/local/nagios/nagiosgraph/etc/nagiosgraph.conf

move/usr/local/nagios/nagiosgraph/etc/nagiosgraph.conf-bak to /usr/local/nagios/nagiosgraph/etc/nagiosgraph.conf

write stub to/usr/local/nagios/nagiosgraph/etc/nagiosgraph-nagios.cfg

write stub to/usr/local/nagios/nagiosgraph/etc/nagiosgraph-commands.cfg

write stub to/usr/local/nagios/nagiosgraph/etc/nagiosgraph-apache.conf

mkdir /usr/local/nagios/nagiosgraph/cgi

copy cgi/showhost.cgi to/usr/local/nagios/nagiosgraph/cgi

replace text in/usr/local/nagios/nagiosgraph/cgi/showhost.cgi

move/usr/local/nagios/nagiosgraph/cgi/showhost.cgi-bak to/usr/local/nagios/nagiosgraph/cgi/showhost.cgi

chmod 755 on/usr/local/nagios/nagiosgraph/cgi/showhost.cgi

copy cgi/showgroup.cgi to/usr/local/nagios/nagiosgraph/cgi

replace text in/usr/local/nagios/nagiosgraph/cgi/showgroup.cgi

move/usr/local/nagios/nagiosgraph/cgi/showgroup.cgi-bak to /usr/local/nagios/nagiosgraph/cgi/showgroup.cgi

chmod 755 on/usr/local/nagios/nagiosgraph/cgi/showgroup.cgi

copy cgi/testcolor.cgi to/usr/local/nagios/nagiosgraph/cgi

replace text in/usr/local/nagios/nagiosgraph/cgi/testcolor.cgi

move /usr/local/nagios/nagiosgraph/cgi/testcolor.cgi-bakto /usr/local/nagios/nagiosgraph/cgi/testcolor.cgi

chmod 755 on/usr/local/nagios/nagiosgraph/cgi/testcolor.cgi

copy cgi/showconfig.cgi to/usr/local/nagios/nagiosgraph/cgi

replace text in/usr/local/nagios/nagiosgraph/cgi/showconfig.cgi

move/usr/local/nagios/nagiosgraph/cgi/showconfig.cgi-bak to/usr/local/nagios/nagiosgraph/cgi/showconfig.cgi

chmod 755 on/usr/local/nagios/nagiosgraph/cgi/showconfig.cgi

copy cgi/show.cgi to/usr/local/nagios/nagiosgraph/cgi

replace text in/usr/local/nagios/nagiosgraph/cgi/show.cgi

move/usr/local/nagios/nagiosgraph/cgi/show.cgi-bak to/usr/local/nagios/nagiosgraph/cgi/show.cgi

chmod 755 on/usr/local/nagios/nagiosgraph/cgi/show.cgi

copy cgi/showgraph.cgi to/usr/local/nagios/nagiosgraph/cgi

replace text in/usr/local/nagios/nagiosgraph/cgi/showgraph.cgi

move/usr/local/nagios/nagiosgraph/cgi/showgraph.cgi-bak to/usr/local/nagios/nagiosgraph/cgi/showgraph.cgi

chmod 755 on/usr/local/nagios/nagiosgraph/cgi/showgraph.cgi

copy cgi/showservice.cgi to/usr/local/nagios/nagiosgraph/cgi

replace text in/usr/local/nagios/nagiosgraph/cgi/showservice.cgi

move/usr/local/nagios/nagiosgraph/cgi/showservice.cgi-bak to/usr/local/nagios/nagiosgraph/cgi/showservice.cgi

chmod 755 on /usr/local/nagios/nagiosgraph/cgi/showservice.cgi

mkdir /usr/local/nagios/nagiosgraph/bin

copy lib/insert.pl to/usr/local/nagios/nagiosgraph/bin

replace text in/usr/local/nagios/nagiosgraph/bin/insert.pl

move/usr/local/nagios/nagiosgraph/bin/insert.pl-bak to/usr/local/nagios/nagiosgraph/bin/insert.pl

chmod 755 on/usr/local/nagios/nagiosgraph/bin/insert.pl

mkdir /usr/local/nagios/nagiosgraph/share

copy share/nagiosgraph.css to/usr/local/nagios/nagiosgraph/share/nagiosgraph.css

copy share/nagiosgraph.js to/usr/local/nagios/nagiosgraph/share

mkdir /usr/local/nagios/nagiosgraph/doc

copy AUTHORS to/usr/local/nagios/nagiosgraph/doc

copy CHANGELOG to/usr/local/nagios/nagiosgraph/doc

copy INSTALL to/usr/local/nagios/nagiosgraph/doc

copy README to /usr/local/nagios/nagiosgraph/doc

copy TODO to/usr/local/nagios/nagiosgraph/doc

mkdir/usr/local/nagios/nagiosgraph/examples

copy examples/map_1_3 to/usr/local/nagios/nagiosgraph/examples

copy examples/nagiosgraph.1.css to/usr/local/nagios/nagiosgraph/examples

copy examples/nagiosgraph.2.css to/usr/local/nagios/nagiosgraph/examples

copy examples/nagiosgraph-logrotate to/usr/local/nagios/nagiosgraph/examples

copy examples/nagiosgraph-commands.cfg to/usr/local/nagios/nagiosgraph/examples

copy examples/map_1_4_4 to/usr/local/nagios/nagiosgraph/examples

copy examples/map_examples to/usr/local/nagios/nagiosgraph/examples

copy examples/map_mwall to/usr/local/nagios/nagiosgraph/examples

copy examples/map_1_4_3 to/usr/local/nagios/nagiosgraph/examples

copy examples/map_minimal to/usr/local/nagios/nagiosgraph/examples

copy examples/nagiosgraph-nagios.cfg to/usr/local/nagios/nagiosgraph/examples

copy examples/nagiosgraph-apache.conf to/usr/local/nagios/nagiosgraph/examples

copy share/graph.gif to /usr/local/nagios/nagiosgraph/examples

copy share/nagiosgraph.ssi to/usr/local/nagios/nagiosgraph/examples

mkdir /usr/local/nagios/nagiosgraph/util

copy utils/testentry.pl to/usr/local/nagios/nagiosgraph/util

copy utils/upgrade.pl to/usr/local/nagios/nagiosgraph/util

chmod 755 on/usr/local/nagios/nagiosgraph/util/testentry.pl

chmod 755 on/usr/local/nagios/nagiosgraph/util/upgrade.pl

mkdir /usr/local/nagios/nagiosgraph/var/rrd

chmod 755 on/usr/local/nagios/nagiosgraph/var/rrd

chown nagios,- on /usr/local/nagios/nagiosgraph/var/rrd

touching/usr/local/nagios/nagiosgraph/var/nagiosgraph.log

chmod 644 on/usr/local/nagios/nagiosgraph/var/nagiosgraph.log

chown nagios,- on/usr/local/nagios/nagiosgraph/var/nagiosgraph.log

touching /usr/local/nagios/nagiosgraph/var/nagiosgraph-cgi.log

chmod 644 on/usr/local/nagios/nagiosgraph/var/nagiosgraph-cgi.log

chown nagios,- on/usr/local/nagios/nagiosgraph/var/nagiosgraph-cgi.log


To complete theinstallation, do the following:

* In the nagios configuration file (e.g.nagios.cfg),

add these lines:

# process nagiosperformance data using nagiosgraph

process_performance_data=1

service_perfdata_file=/tmp/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-for-nagiosgraph


* In the nagios commands file (e.g.command.cfg),

add these lines:

# command to processnagios performance data for nagiosgraph

define command {

command_nameprocess-service-perfdata-for-nagiosgraph

command_line/usr/local/nagios/nagiosgraph/bin/insert.pl

}


* In the apache configuration file (e.g.httpd.conf),

add this line:

include/usr/local/nagios/nagiosgraph/etc/nagiosgraph-apache.conf


* Restart nagios to start data collection:

/etc/init.d/nagiosrestart


* Restart apache to enable display of graphs:

/etc/init.d/apacherestart

* To enable graph links and mouseovers, seeREADME sections:

Displaying Per-Service and Per-HostGraph Icons and Links

Displaying Graphs in Nagios Mouseovers


注意最后出現(xiàn)的這幾行,這是對(duì)于以后nagiosgraph的配置信息

 (1):在nagios的配置文件(nagios.cfg)中加入以下幾行


# process nagiosperformance data using nagiosgraph

process_performance_data=1

service_perfdata_file=/tmp/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-for-nagiosgraph


 (2):在nagios命令文件(command.cfg)中加入以下幾行


# command to processnagios performance data for nagiosgraph

define command {

command_nameprocess-service-perfdata-for-nagiosgraph

command_line/usr/local/nagios/nagiosgraph/bin/insert.pl

}


 (3):在apache配置文件httpd.conf中加入

include/usr/local/nagios/nagiosgraph/etc/nagiosgraph-apache.conf

注意include第一個(gè)字母大寫(xiě)

 (4):重啟nagio和httpd后登錄nagiosgraph

http://localhost/nagiosgraph/cgi-bin/show.cgi

出現(xiàn)以下結(jié)果

nagios 圖形化界面之三 (nagiosgraph)

可以先選擇host然后點(diǎn)擊update graphs 然后,在左上角再點(diǎn)擊data for host……中的主機(jī)名稱(chēng)就可以了

 (5):把nagiosgraph路徑加到nagios系統(tǒng)內(nèi)


/usr/local/nagios/share/side.php加入如下內(nèi)容
$nagiosgraph_path='/nagiosgraph/cgi-bin';?>
  • Nagiosgraph
    • Graphs
    • Graphs by Host
      >
    • Graphs by Serv
    • ice
    • Graphs by Group<
    • /a>


      其實(shí)就是nagiosweb 界面的reports欄加入了trends如下

      nagios 圖形化界面之三 (nagiosgraph)

      另外有需要云服務(wù)器可以了解下創(chuàng)新互聯(lián)scvps.cn,海內(nèi)外云服務(wù)器15元起步,三天無(wú)理由+7*72小時(shí)售后在線,公司持有idc許可證,提供“云服務(wù)器、裸金屬服務(wù)器、高防服務(wù)器、香港服務(wù)器、美國(guó)服務(wù)器、虛擬主機(jī)、免備案服務(wù)器”等云主機(jī)租用服務(wù)以及企業(yè)上云的綜合解決方案,具有“安全穩(wěn)定、簡(jiǎn)單易用、服務(wù)可用性高、性價(jià)比高”等特點(diǎn)與優(yōu)勢(shì),專(zhuān)為企業(yè)上云打造定制,能夠滿足用戶豐富、多元化的應(yīng)用場(chǎng)景需求。


      文章名稱(chēng):nagios圖形化界面之三(nagiosgraph)-創(chuàng)新互聯(lián)
      網(wǎng)站URL:http://weahome.cn/article/djppeh.html

      其他資訊

      在線咨詢

      微信咨詢

      電話咨詢

      028-86922220(工作日)

      18980820575(7×24)

      提交需求

      返回頂部