223n監(jiān)控服務搭建配置_第1頁
223n監(jiān)控服務搭建配置_第2頁
223n監(jiān)控服務搭建配置_第3頁
223n監(jiān)控服務搭建配置_第4頁
223n監(jiān)控服務搭建配置_第5頁
已閱讀5頁,還剩37頁未讀, 繼續(xù)免費閱讀

下載本文檔

版權說明:本文檔由用戶提供并上傳,收益歸屬內容提供方,若內容存在侵權,請進行舉報或認領

文檔簡介

1、Nagios服務器運行狀態(tài)常見開源的對比和選擇cacticacti 不是工具,他是個依賴于 SNMP 的和數(shù)據呈現(xiàn)的工具。功能:、保存數(shù)據SQL,txt數(shù)據展示(rrdtool 繪圖)數(shù)據分析和(很一般)nagios功能: 數(shù)據(功能是 Nagios 的特色功能)故障觸發(fā),故障恢復都可以依賴分析(能自動的識別到關鍵設備的故障,關聯(lián)設備)(的數(shù)據是弱項,他只關心警戒位,只關心正常與否的狀態(tài),狀態(tài)轉換時可以實現(xiàn),所以它的數(shù)據不需要保存),當然也有插件彌補這個不足,如 PNP4Nagios。Nagios+cacti 整合互相彌補不足!zabbixnagios 和 cacti 不適合超大規(guī)模的、由于大

2、規(guī)模的帶寬和限制,會導致的延遲等問題,所以有很多是 nagios+cacti 整合,但是依然不適合在大規(guī)模的環(huán)境中,不適合分布式部署,Nagios 在大規(guī)模中就會出現(xiàn)延遲,失去 Nagios 本事的特色。那么 zabbix 同時整合了 cacti 和 Nagios 特點的工具,而且還具有了前兩者不具有的工具,支持分布式等等。補充工具:netdata:托管在上的一款類型 zabbix 的開源工具 https:/.com/firehol/netdataopen-falcon:小米公司開源的企業(yè)級工具Ganglia 類似于 zabbix,大型分布式系統(tǒng)開源工具對比2、的方式SNMP:簡單管理協(xié)議Ag

3、ent:的方式去數(shù)據Shell,:通過獲取信息來3、數(shù)據展示方式:java、php、APP4、方式:mail、及時通信工具NagiosNagios 是一款開源的網路監(jiān)視工具,可以的設備:Windows,Linux,Unix,Router,Switch,打印機等,具有功能,是一個系統(tǒng)。在系統(tǒng)或服務狀態(tài)異常時發(fā)出郵件或第一時間通知運維,在狀態(tài)恢復后發(fā)出正常的郵件或通知。Nagios Core原先設計在 Linux 下運行,當然,它在其他的 Unix 系統(tǒng)下應該也能進行工作。:也分為很多個 Nagios 版本其中,我們看到 Nagios 4.0數(shù)字版本命名的為開源的版本(core 開源免有很多版本是

4、的,如上圖),Nagios XI英文版后綴再跟版本名為商業(yè)版本,如下圖于 Nagios,我們需要配合許多組件和插件來工作(打開很慢,需要 FQ):/Nagios 界面很不美觀,可以更換主題/Nagios 插件/各類拓展組件,包括/插件或Nagios 運行模式和優(yōu)點運行模式:數(shù)據收集是 C/S 模式,用戶查看信息是 B/S 模式優(yōu)點:1:網路服務狀態(tài)(HTTPD,F(xiàn)TP,SSH,MySql)2:主機(處理器符合,硬盤利用率)3:拓展,根據的需求實現(xiàn)拓展檢測功能(插件開發(fā))4:自動日志回滾5:能夠定義主機的層次,逐級檢查,就是從父主機開始向下檢查6:警告,基于狀態(tài)的警告:OK,Warning(警告

5、),critical(關鍵),unknown(未知)7:可以支持并實現(xiàn)對主機的冗余8:Web 界面可以查看當前狀態(tài),通知,問題歷史,日志文件等Nagios 運行原理Nagios 的功能是服務和主機,但是他自身并不包括這部分功能,所有的監(jiān)控、檢測功能都是通過各種插件來完成的。啟動 Nagios 后,它會周期性的自動調用插件去檢測服務器狀態(tài),同時 Nagios會維持一個隊列,所有插件返回來的狀態(tài)信息都進入隊列,Nagios 每次首開始信息,并進行處理后,把狀態(tài)結果通過 web。Nagios 提供了許多插件,利用這些插件可以方便的很多服務狀態(tài)。安裝完成后,在 nagios 主目錄下的/libexec

6、 里放有 nagios 自帶的可以使用的所有插件,如,check_disk 是檢查磁盤空間的插件,check_load 是檢查 CPU 負載的,等等。每一個插件可以通過運行./check_h 來查看其使用方法和功能。兩張比較經典的圖在大規(guī)模生產環(huán)境中,如果需要瀏覽歷史數(shù)據,需要結合 db獲取數(shù)據的方式:主動、NRPE 插件、SNMP、NSClient+Nagios 通過 NRPE 來遠端管理服務1. Nagios 執(zhí)行安裝在它里面的 check_nrpe 插件,并告訴 check_nrpe 去檢測哪些服務。2.通過 SSL,check_nrpe 連接遠端機子上的 NRPE daemon3.NR

7、PE 運行本地的各種插件去檢測本地的服務和狀態(tài)(check_disk,.etc)4.最后,NRPE 把檢測的結果傳給主機端的 check_nrpe,check_nrpe 再把結果送到 Nagios 狀態(tài)隊列中。5. Nagios 依次隊列中的信息,再把結果。Nagios 所需要的軟件LAP 環(huán)境,不需要 mysqlnagios-3.5.1.tar.gz#Nagios文件,Nagios 服務文件,不建議用最新,很多插件沒做好nagios-plugins-2.1.1.tar.gz#Nagios 插件,用于存放和命令NSCP-0.5.0#也就是 Nsclient+,用來Windows,分為 64 位

8、、32 位版本nrpe-2.15.tar.gz#服務,用于非 Nagios 服務器的服務器本地私有信息vautour_style.zip#主題包部署 Nagios服務器部署之前,需要做好最基本的環(huán)境,包括 LAP 環(huán)境的構建(這里直接使用 yum方式安裝即可,在做 zabbix 的時候我們需要使用我們編譯的 LNMP 環(huán)境來做)解決依賴和安裝 LAP 環(huán)境Centos7 安裝 epel 源:rpm -ivhrootxuegod63 # yum clean all & yum listrootxuegod63 # yum install -y gcc glibc glibc-common php

9、 gd gd-devel libpng libmng libjpeg zlibrootxuegod63 # yum install -y httpd ; systemctl start httpdNagios 運行用戶rootxuegod63 # useradd nagios#建立 Nagios 用戶,這里不能使用 nologin 的 shell,nagios 會用到rootxuegod63 # groupadd nagcmd rootxuegod63 # usermod -G nagcmd nagios #將 Nagios 和 apache 加入該組rootxuegod63 # usermo

10、d -G nagcmd apache#建立一個組Nagios安裝rootxuegod63 # mkdir Nagiosrootxuegod63 # cd Nagios ; ls#所有軟件包放在此目錄下rootxuegod63 Nagios# tar xvf nagios-3.5.1.tar.gz -C /usr/local/src/ rootxuegod63 Nagios# cd /usr/local/src/nagios/ rootxuegod63nagios# ./configure -with-command-group=nagcmd#指定 Nagios 運行用戶組General Opt

11、ions:Nagios executable: nagiosNagios user/group: nagios,nagios#運行用戶Command user/group: nagios,nagcmd#運行用戶組Embedded Perl: no Event Broker: yesInstall $prefix: /usr/local/Nagios#默認安裝到了/usr/local/nagiosLock file: $prefix/var/nagios.lockCheck resuirectory: $prefix/var/spool/checkresultsnagios-3.5.1.tar.

12、gznrpe-2.15.tar.gznagios-plugins-2.1.1.tar.gz vautour_style.ziprootxuegod63 nagios# make all#根據上面提示,Make all,下圖出現(xiàn),就無問題* Compile finished *If the main program and CGIs compiled without any errors, you can continue with installing Nagios as follows (typemake without any arguments for a list of all pos

13、sible options):#下面已經提示安裝步驟,我們就使用這個步驟來操作make install- This installs the main program, CGIs, and HTML filesmake install-init- This installs the init script in /etc/rc.d/init.dmake install-commandmodeInit directory: /etc/rc.d/init.dApache conf.d directory: /etc/httpd/conf.d#Apache 的 conf.d 配置文件目錄Mail p

14、rogram: /bin/mail Host OS: linux-gnuWeb Interface Options:HTML URL:#登陸地址CGI URL:Traceroute (used by WAP): /bin/tracerouteReview the options above for accuracy. If they look okay, typemake all to compile the main program and CGIs.- This installs and configures permissions on thedirectory for holding

15、the external command filemake install-config- This installs *SAMPLE* config files in /usr/local/nagios/etc Youll have to modify these sample files before you can use Nagios. Read the HTML documentation for more info on doing this. Pay particular attention to the docs on object configuration files, a

16、s they determine what/howthings get monitored!make install-webconf- This installs the Apache config file for the Nagios web interfacemake install-exfoliation#主題相關,不需要安裝- This installs the Exfoliation theme for the Nagiosweb interfacemake install-classicui以了#主題相關,不需要安裝,安裝到 web-conf 就可- This installs

17、the classic theme for the Nagiosweb interface* Support Notes *If you have questions about configuring or running Nagios,please make sure that you:rootxuegod63 nagios# make install & make install-init & make install-commandmode & make install-config & makeinstall-webconf#若是單步執(zhí)行,每次執(zhí)行一部,都會提示你需要干什么,非常 e

18、asy/make install#安裝生成/usr/local/nagios/,其中/usr/local/nagios/share 即 nagiosWEB界面的站點目錄/make install-init#安裝生成/etc/rc.d/init.d/nagios 啟動- Look at the sample config files- Read the documentation on the Nagios Library at:before you post a question to one of thing lists. Also make sure to include pertinen

19、t information that could help others help you. This might include:- What version of Nagios you are using- What version of the plugins you are using- Relevant snippets from your config files- Relevant error messages from the Nagios log fileFor more information on obtaining support for Nagios, visit:*

20、Enjoy./make install-config#安裝生成/usr/local/nagios/etc 下的 nagios 相關配置文件/make install-commandmode#設定相應 nagios 工作目錄的權限/make install-webconf#安裝 Nagios 的WEB 配置文件到Apache 的conf.d 目錄下到此時,安裝過程就結束了在安裝的時候,make install 生成 share 這個目錄,這個目錄是rootxuegod63 nagios# ls /usr/local/nagios/share/界面目錄:config.inc.php context

21、helpdocsimagesincludesjsmain.phprobots.txtside.phprss-corefeed.phpssirss-newsfeed.phpstylesheetsindex.phpmedia在 make install-init 的時候,生成啟動rootxuegod63 Nagios# ls /etc/init.d/nagios/etc/init.d/nagios#其實就是在/etc/rc.d/init.d/nagios在 make install-config 的時候,生成了 Nagios 的相關配置文件rootxuegod63 Nagios# ls /usr/

22、local/nagios/etc/ cgi.cfg nagios.cfg objects resource.cfg#包括以后安裝了 plugin 等軟件后,配置文件也會放入此目錄resource.cfg:定義了很多變量的調用在 make install-webconf 的時候,已經把 web-conf 的配置文件放入了/etc/httpd/conf.d/下面rootxuegod63 Nagios# ls /etc/httpd/conf.d/nagios.conf/etc/httpd/conf.d/nagios.conf#里面配置了一個別名,直接了/usr/local/nagios/share

23、目錄rootxuegod63 Nagios# vim /etc/httpd/conf.d/nagios.confNagios 主目錄rootxuegod63 Nagios# ll /usr/local/nagios/認識一下 nagios 的配置文件rootxuegod63 Nagios# vim /usr/local/nagios/etc/nagios.cfglog_file=/var/log/nagios/nagios.log#日志位置cfg_file=/etc/nagios/objects/commands.cfg#這個文件定義了很多命令cfg_file=/etc/nagios/obje

24、cts/contacts.cfg#定義人,怎么cfg_file=/etc/nagios/objects/timeperiods.cfg#定義了時間段cfg_file=/etc/nagios/objects/templates.cfg#模板(人,主機,時間)cfg_file=/etc/nagios/objects/localhost.cfg#本機相關配置文件#cfg_file=/etc/nagios/objects/windows.cfg#windows,默認不#cfg_file=/etc/nagios/objects/switch.cfg#交換機路由器,默認不#cfg_file=/etc/na

25、gios/objects/printer.cfg#打印機,默認不bin#Nagios 執(zhí)行程序所在目錄etc#nagios 配置文件所在目錄,初始安裝只有幾個*.cfg 文件libexec#所用命令,需要安裝了 nagios-plugins 插件了才會有,檢測命令,不裝是空的sbin#Nagios 的 Cgi 文件所在目錄,外部命令所需要的文件存放目錄share#Nagios 前端頁面var#日志文件,pid 文件等rootxuegod63 Nagios# vim /usr/local/nagios/etc/cgi.cfg/此配置文件比 nagios.cfg 優(yōu)先級高Nagios測試rootx

26、uegod63 Nagios# systemctl restart httpd打開main_config_file= /usr/local/nagios/etc/nagios.cfg#主配置文件physical_html_path= /usr/local/nagios/share#物理路徑url_html_path=/nagios#在 URL 后面加上/nagios 才能use_authentication=1#使用認證use_ssl_authentication=0#不使用 ssl authorized_for_system_information=nagiosadmin#認證用戶#cfg_

27、dir=/etc/nagios/servers#定義了服務合集(多個使用)#cfg_dir=/etc/nagios/printers#定義了打印機合集(多個使用)#cfg_dir=/etc/nagios/switches#定義了交換合集(多個使用)#cfg_dir=/etc/nagios/routers#定義了路由合集(多個使用) resource_file=/etc/nagios/private/resource.cfg變量配置文件,包括$USER1$變量(一個路徑)等status_update_interval=10#狀態(tài)更新時間,slog_rotation_method=d#日志滾動,默

28、認天service_check_timeout=60#服務檢查超時時間host_check_timeout=30#主機檢查超時時間event_handler_timeout=30notification_timeout=30 ocsp_timeout=5perfdata_timeout=5需要用戶名和,查看 vim /etc/httpd/conf.d/nagios.conf 配置文件rootxuegod63 Nagios# vim /etc/httpd/conf.d/nagios.conf在 Directory 字面有 Auth 這三個字段,那么就可以使用 htpasswd 來生戶名和root

29、xuegod63# htpasswd -c /usr/local/nagios/etc/htpasswd.users nagiosadmin# -c 表示創(chuàng)建,二次添加用戶,不能使用-c 參數(shù)rootxuegod63# systemctl restart httpd#再次測試(我創(chuàng)建用戶名是 nagiosadmin,123456)#nagios 默認使用 nagiosadmin 來管理,如果使用其他用戶名,對應的配置文件也要修改檢查配置文件在 nagios 的目錄下,bin 目錄下有一個 nagios 命令,這個命令可以幫助我們對配置文件的檢查工作以及指定相關配置文件rootxuegod63

30、Nagios# /usr/local/nagios/bin/nagios -v/usr/local/nagios/etc/nagios.cfg-v=-verify-config 驗證配置文件是否有誤,著重看到下圖亮點就沒問題Total Warnings:0 Total Errors:0指定配置文件,以守護進程方式啟動rootxuegod63 Nagios# /usr/local/nagios/bin/nagios -d/usr/local/nagios/etc/nagios.cfg但是現(xiàn)在還沒有做任何深入配置,所以現(xiàn)在只是可以登錄而已!安裝 Nagios-plugins 插件為了后面的實驗要求

31、,我們先把 mysql 客戶端安裝了。yum install mysql mysql-devel 或者 yum install mariadb mariadb-develNagios-plugins 含有豐富的檢測命令插件,安裝完成之后放在了/usr/local/Nagios/libexec 下面rootxuegod63 Nagios# tar xvf nagios-plugins-2.1.1.tar.gz -C /usr/local/src/ rootxuegod63 Nagios# cd /usr/local/src/nagios-plugins-2.1.1/ rootxuegod63 n

32、agios-plugins-2.1.1# ./configure -with-nagios-user=nagios-with-nagios-group=nagcmdrootxuegod63 nagios-plugins-2.1.1# make & make install ; cd/root/Nagios/rootxuegod63# ls /usr/local/nagios/libexec/ 已經有了很多 check 命令check_apt check_ftpcheck_mailq check_oracle check_ssmtp check_breeze check_http check_m

33、rtg check_overcr check_swa pcheck_by_ssh check_icmp check_mrtgtraf check_pgsql check_tc pcheck_clamd check_ide_smart check_mysql check_ping check_time啟動 Nagios 服務,檢查環(huán)境rootxuegod63 #systemctl restart httpd; /etc/init.d/nagios restart瀏覽器測試:登陸之后,點擊 hosts,可以看到,默認沒有什么問題的是本機,說明環(huán)境Nagios本服務器配置之前,我們需要做一系列的準備

34、工作(指定主配置文件需要加載的配置文件定義主機定義服務 定義命令檢查配置文件啟動 Nagios)本地 NFS 狀態(tài)先安裝 yum -y install nfs-utilsrootxuegod63 Nagios# cd /usr/local/nagios/etc/objects rootxuegod63 objects# cp localhost.cfg localhost.cfg.bak #備份配置文件rootxuegod63 objects# vim localhost.cfgdefine servicecheck_clustercheck_ifoperstatus check_mysql_

35、query check_popcheck_udprootxuegod63 objects# vim /etc/exports/創(chuàng)建一個共享rootxuegod63 objects# systemctl restart nfs rootxuegod63 objects# showmount -e 3否正常/檢測NFS 目前是檢測 localhost 是否正常啟用rootxuegod63 objects# grep cfg_file /usr/local/nagios/etc/nagios.cfg檢測配置文件是否有誤rootxuegod63 objects# /usr/loc

36、al/nagios/bin/nagios -v/usr/local/nagios/etc/nagios.cfgrootxuegod63 objects# /etc/init.d/nagios restart網頁測試#重啟 nagios 服務Total Warnings:0Total Errors:0cfg_file=/usr/local/nagios/etc/objects/localhost.cfg#localhost 默認已經啟用了Export list for 3:/tmp */tmp*(rw)uselocal-servicehost_namelocalhostse

37、rvice_descriptionNFScheck_commandcheck_tcp!2049#在使用 check 命令之前,要確保下/usr/local/nagios/libexec/ 目錄下有沒有你需要的 check 命令,如果有,直接調用,如果沒有,檢測端口來代替,檢測格式: check_tcp!端正在檢測,稍等一會兒停止 NFS 服務rootxuegod63 objects# systemctl stop nfs/再觀察這里注意,一般沒回立馬又狀態(tài),需要一段時間,最好最快的方法就是手動強制刷新,否則你需要等待,強制刷新,點擊 NFS 后有一個 Re-schedule thenext c

38、heck of this service,強制刷新可以看到狀態(tài)了,一般狀態(tài)有四種顏色,如下圖:修改 Nagios 默認的主題:把主題包解壓到對應的目錄下rootxuegod63 # unzip vautour_style.zip -d /usr/local/nagios/share/ Archive:vautour_style.zipreplace /usr/local/nagios/share/images/ack.gif? yes, no, All, None,rename: A#選擇 A 全部覆蓋inflating: /usr/local/nagios/share/images/ack.

39、gifrootxuegod63 # /etc/init.d/nagios restart#重啟 nagios 服務NagiosMYSQL數(shù)據庫狀態(tài)【任何一臺服務器,工作流程是定義主機,定義服務,定義命令】Nagios:3xuegod64 上安裝 msyqlMySQL Server :4rootxuegod64 # yum install mairadb-server mariadbrootxuegod64 # systemctl start mariadb.servicerootxuegod64 # mysqlmysql create databas

40、e nagios;/登陸創(chuàng)建一個測試數(shù)據庫mysql grant select on nagios.* to nagios3identified by 123456;mysql exitxuegod63 上配置 Nagios 服務rootxuegod63 objects# vim /usr/local/nagios/etc/nagios.cfgrootxuegod63 objects# vim hosts.cfgrootxuegod63 objects# vim service.cfgrootxuegod63 objects# vim commands.cfgrootxu

41、egod63 objects# /usr/local/nagios/libexec/check_mysqldefine commandcommand_namecheck_mysqlcommand_line$USER1$/check_mysql -H $HOSTADDRESS$ -u nagios p123456 -d nagiosdefine serviceuselocal-servicehost_name service_descriptionMySqlSev check_commandcheck_mysqldefine hostuselinux-server#使用的模板名字host_nam

42、e#主機名address4#IP 地址# Definitions for monitoring the local (Linux) host cfg_file=/usr/local/nagios/etc/objects/localhost.cfg #在這兩行下面添加下面兩行cfg_file=/usr/local/nagios/etc/objects/hosts.cfgcfg_file=/usr/local/nagios/etc/objects/service.cfg-H4 -unagios -p123456 -d nagios注意:所有的 check

43、_command 字段中的所使用令,必須在 command.cfg中定義好才能使用,而 command.cfg 中的 command_line 中使用在/usr/local/Nagios/libexec/目錄下,安裝 plugins 會生成令,必須手動檢測 command.cfg令有效性注意:服務器要安裝了 mysql 客戶端軟件,然后再重新編譯安裝下 plugins 才會生成 check_mysqlyum install mysql mysql-develrootxuegod64 # /etc/init.d/mysqld stop#xuegod64 停掉服務再檢測rootxuegod63 o

44、bjects# /usr/local/nagios/libexec/check_mysql-H4 -unagios -p123456 -d nagios我們看測試rootxuegod63 objects# /etc/init.d/nagios restart主機狀態(tài)正常Cant connect to MySQL server on 4 (111)Uptime:1810 Threads:1 Questions:6 Slow queries:0 Opens:15 Flushtables:1 Open tables:8 Queries per seconda

45、vg:0.3|Connections=4c; Open_files=16; Open_tables=8; Qcache_free_memory=0; Qcache_hits=0c; Qcache_inserts=0c; Qcache_lowmem_prunes=0c; Qcache_not_cached=0c; Qcache_queries_in_cache=0; Queries=6c; Questions=6c; Table_locks_waited=0c; Threads_connected=1; Threads_running=1; Uptime=1810c;剛才已停掉數(shù)據庫提示警告嚴重

46、狀態(tài)rootxuegod64 # /etc/init.d/mysqld start#重新啟動 mysqld 測試web 服務:定義先手動測試下:/usr/local/nagios/libexec/check_tcp -H4 -p 80rootxuegod63 objects# vim hosts.cfgrootxuegod63 objects# vim service.cfgdefine serviceuselocal-servicehost_name service_descriptionNginx check_commandcheck_nginxdefine host

47、uselinux-server host_name address4#上面已經定義過 xuegod64 的主機,此處無需再定義rootxuegod63 objects# vim commands.cfgrootxuegod63 objects#/etc/init.d/nagios restart#重啟測試nginxNagios外部主機私有信息私有信息,包括默認的硬盤使用,進程數(shù)目,SWAP 分區(qū)等等私有信息,就是我需要在本機登陸操作登陸的非私有,就是可以通過的方式只有私有信息的時候,才調用 NRPE 這個插件來通信nrpe 插件通過 NRPE(一個插件)服務可以添加本地信

48、息的Nagios 服務器,將數(shù)據到我們的NRPE 兩部分組成,一部分是守護進程機 check_nrpe,一部分是被機的 NRPENagios 服務器執(zhí)行 check_nrpe 插件并告訴他檢查哪個服務,check_nrpe 插件通過 SSL 連接方式服務器上的 NRPE 守護進程,NRPE 守護進程執(zhí)行相應的插件完成指定的檢查,并返回結果。nrpe 工作原理define commandcommand_namecheck_nginxcommand_line$USER1$/check_tcp -H $HOSTADDRESS$ -p 80Nrpe 是基于 SSL 的機制,那么我們需要做的事情就是構建

49、 SSL 環(huán)境,所以需要使用 NRPE 工作的時候,都需要安裝 SSL,而且服務端和客戶端都需要安裝nrpe 軟件,而我們客戶端不需要安裝 NAGIOS 服務端客戶端的 NRPE 安裝1:安裝 nagios- plugins 插件2:安裝 NRPE( make install-daemon-config make install-xinetd)3:配置我們 xinted 服務,4:啟動 xinetd5:查看端口是否正常啟動解決依賴拿數(shù)據rootxuegod63 #yum install -y openssl openssl-devel rootxuegod64 #yum install -y

50、openssl openssl-devel實驗所需設備都需要安裝 SSL 的支持服務端安裝 NRPErootxuegod63 Nagios# tar xvf nrpe-2.15.tar.gz -C /usr/local/src/ rootxuegod63 Nagios# cd /usr/local/src/nrpe-2.15/ rootxuegod63 nrpe-2.15# ./configure & make & make installrootxuegod63 nrpe-2.15# make install-plugin & make install-daemon#前者安裝插件,后者以守護

51、經常來運行rootxuegod63 nrpe-2.15# ls /usr/local/nagios/libexec/usr/local/nagios/libexec/check_nrpe#這個命令需要安裝 nrpe 之后才有客戶端配置rootxuegod63 objects# cd /root/Nagios/rootxuegod63 Nagios# scp nagios-plugins-2.1.1.tar.gz nrpe-2.15.tar.gz root4:/rootrootxuegod64 # useradd -s /sbin/nologin nagios rootxu

52、egod64 # groupadd nagcmd rootxuegod64 # usermod -G nagcmd nagios rootxuegod64 # yum install -y xinetdrootxuegod64 # tar xvf nagios-plugins-2.1.1.tar.gz -C /usr/local/src/ rootxuegod64 # tar xvf nrpe-2.15.tar.gz -C /usr/local/src/ rootxuegod64 # cd /usr/local/src/nagios-plugins-2.1.1/rootxuegod64 nag

53、ios-plugins-2.1.1# ./configure & make & make install rootxuegod64 nagios-plugins-2.1.1# cd ./nrpe-2.15/rootxuegod64 nrpe-2.15# ./configure & make & make installrootxuegod64 nrpe-2.15# make install-daemon-config端,不用 make-install-pluginrootxuegod64 nrpe-2.15# make install-xinetd rootxuegod64 # vim /etc/xinetd.d/nrpe/這里是客戶# default: on

溫馨提示

  • 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
  • 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權益歸上傳用戶所有。
  • 3. 本站RAR壓縮包中若帶圖紙,網頁內容里面會有圖紙預覽,若沒有圖紙預覽就沒有圖紙。
  • 4. 未經權益所有人同意不得將文件中的內容挪作商業(yè)或盈利用途。
  • 5. 人人文庫網僅提供信息存儲空間,僅對用戶上傳內容的表現(xiàn)方式做保護處理,對用戶上傳分享的文檔內容本身不做任何修改或編輯,并不能對任何下載內容負責。
  • 6. 下載文件中如有侵權或不適當內容,請與我們聯(lián)系,我們立即糾正。
  • 7. 本站不保證下載資源的準確性、安全性和完整性, 同時也不承擔用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。

評論

0/150

提交評論