First, the experimental environment:
Rhel1 ———— ip:192.168.10.1 ———— monitoring Terminal rhel6.0 system
Rhel2 ———— ip:192.168.10.2 ———— monitored segment rhel6.0 system
Client ———— ip:192.168.10.3 ———— monitored end Windows XP system
Second, rhel1 (monitoring side) installation steps:
(1.) Install apache+php build PHP running environment, do not introduce;
(2.) Install the required packages before compiling:
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/4C/45/wKiom1Q6dEWQEVVgAAA-8nOlIMQ862.jpg "title=" 2.png " alt= "Wkiom1q6dewqevvgaaa-8nolimq862.jpg"/>
(3.) Required Packages:
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/4C/45/wKiom1Q6dMCiDLrsAACc7PVXzHQ025.jpg "title=" 2.png " alt= "Wkiom1q6dmcidlrsaacc7pvxzhq025.jpg"/>
(4.) Nagios and its plugins compiled and installed:
1. Adding users and Groups:
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/4C/45/wKiom1Q6dwHScXpLAAA-VoMP9qc425.jpg "title=" 2.png " alt= "Wkiom1q6dwhscxplaaa-vomp9qc425.jpg"/>
2.nagios Compile and install:
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/4C/45/wKiom1Q6d83RLymJAADzdGrg2WE988.jpg "title=" 2.png " alt= "Wkiom1q6d83rlymjaadzdgrg2we988.jpg"/>
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/4C/46/wKioL1Q6eg_RG5KGAAD43oFslBA539.jpg "title=" 2.png " alt= "Wkiol1q6eg_rg5kgaad43ofslba539.jpg"/>
3.nagios Plug-in compilation installation:
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/4C/46/wKioL1Q6e6ijusq2AAD48VsVu28407.jpg "title=" 3.png " alt= "Wkiol1q6e6ijusq2aad48vsvu28407.jpg"/>
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/4C/45/wKiom1Q6euHQ9yRGAAA3wvbviDw964.jpg "title=" 2.png " alt= "Wkiom1q6euhq9yrgaaa3wvbvidw964.jpg"/>
4.nagios Chinese plugin compile and install:
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/4C/45/wKiom1Q6e9mDpMefAACepZHg-Rw904.jpg "title=" 2.png " alt= "Wkiom1q6e9mdpmefaacepzhg-rw904.jpg"/>
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/4C/45/wKiom1Q6fByBN_jZAAA36WTO06M528.jpg "title=" 2.png " alt= "Wkiom1q6fbybn_jzaaa36wto06m528.jpg"/>
5.nrpe Compile and install:
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/4C/47/wKioL1Q6gT6hgljFAACSuiOXLtE625.jpg "title=" 2.png " alt= "Wkiol1q6gt6hgljfaacsuioxlte625.jpg"/>
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/4C/46/wKiom1Q6gX7w32hCAABtZVz9sDM943.jpg "title=" 2.png " alt= "Wkiom1q6gx7w32hcaabtzvz9sdm943.jpg"/>
Third, rhel1 (monitoring side) configuration steps:
(1.) Apache Configuration and Startup:
1. The following files need to be looked at, not configured:
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/4C/47/wKioL1Q6hdyRoMwUAAB6UyNn6Ns430.jpg "title=" 2.png " alt= "Wkiol1q6hdyromwuaab6uynn6ns430.jpg"/>
2. Start Apche;
(2.) Add Nagios Web page Admin User:
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/4C/59/wKioL1Q7s0DDgIiXAACGaaUnWQ8421.jpg "title=" 2.png " alt= "Wkiol1q7s0ddgiixaacgaaunwq8421.jpg"/>
(3.) Modify the Nagios.cfg configuration file vim/usr/local/nagios/etc/nagios.cfg;
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/4C/59/wKioL1Q7tYiS96n5AABLEZ3xZQY711.jpg "title=" 2.png " alt= "Wkiol1q7tyis96n5aablez3xzqy711.jpg"/>
(4.) Modify the Localhost.cfg configuration file to add the host you want to monitor rhel2,vim/usr/local/nagios/etc/objects/ Localhost.cfg, in order to facilitate, directly to the original localhost template modification, the configuration file all the contents are as follows:
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/4C/5A/wKioL1Q7uLvim-KFAAIkonmlHOI559.jpg "style=" float: none; "title=" 2.png "alt=" Wkiol1q7ulvim-kfaaikonmlhoi559.jpg "/>
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/4C/59/wKiom1Q7uISCTmAWAALIELKCmbU321.jpg "style=" float: none; "title=" 3.png "alt=" Wkiom1q7uisctmawaalielkcmbu321.jpg "/>
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/4C/5A/wKioL1Q7uLuTFXxBAACM9SGYYyM218.jpg "style=" float: none; "title=" 4.png "alt=" Wkiol1q7ulutfxxbaacm9sgyyym218.jpg "/>
(5.) Modify the Windows.cfg configuration file to add the host you want to monitor client,vim/usr/local/nagios/etc/ Objects.cfg, in order to facilitate, directly to the Windows.cfg template file modification, the configuration file all the contents are as follows:
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/4C/5A/wKioL1Q7xSPDPUQgAAIUg5iQ8gs705.jpg "title=" 2.png " alt= "Wkiol1q7xspdpuqgaaiug5iq8gs705.jpg"/>
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/4C/5A/wKiom1Q73LWSERpGAAGtJQVplK4829.jpg "title=" 3.png " alt= "Wkiom1q73lwserpgaagtjqvplk4829.jpg"/>
(6.) Test the configuration file for errors:
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/4C/59/wKiom1Q7xTeQv1EzAABJlFbO6wM494.jpg "title=" 2.png " alt= "Wkiom1q7xteqv1ezaabjlfbo6wm494.jpg"/>
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/4C/5A/wKioL1Q7xdqjj0aKAABKjoG4Tfk195.jpg "title=" 2.png " alt= "Wkiol1q7xdqjj0akaabkjog4tfk195.jpg"/>
(7.) Start Nagios:
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/4C/59/wKioL1Q7s3OAAn7kAABRceo5Jsg008.jpg "title=" 2.png " alt= "Wkiol1q7s3oaan7kaabrceo5jsg008.jpg"/>
(8.) to see if Nagios is running:
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/4C/59/wKioL1Q7sdmSZijRAADjdlNVONM181.jpg "title=" 2.png " alt= "Wkiol1q7sdmszijraadjdlnvonm181.jpg"/>
Four , rhel2 (monitored side) installation:
(1.) Install the required packages before compiling:
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/4C/47/wKioL1Q6fm-AWhV9AABObOgsRaI847.jpg "title=" 2.png " alt= "Wkiol1q6fm-awhv9aabobogsrai847.jpg"/>
(2.) the required packages are as follows:
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/4C/59/wKiom1Q7xgWS0oQMAABmpFHufRY268.jpg "title=" 2.png " alt= "Wkiom1q7xgws0oqmaabmpfhufry268.jpg"/>
(3.) Add Nagios Users and Groups:
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/4C/5A/wKioL1Q7xq7AJQE8AAAiJ7np9wk740.jpg "title=" 2.png " alt= "Wkiol1q7xq7ajqe8aaaij7np9wk740.jpg"/>
(4.) Nagios-plugins Compile and install:
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/4C/5A/wKioL1Q7xx7D0_iRAADrqDXTtfk620.jpg "title=" 2.png " alt= "Wkiol1q7xx7d0_iraadrqdxttfk620.jpg"/>
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/4C/5A/wKioL1Q7x8PTSUAeAAA37VWv2Ns805.jpg "title=" 2.png " alt= "Wkiol1q7x8ptsuaeaaa37vwv2ns805.jpg"/>
(5.) Nrpe Compile and install:
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/4C/59/wKiom1Q7yEvjrdoVAACM4AwYCwE982.jpg "title=" 2.png " alt= "Wkiom1q7yevjrdovaacm4awycwe982.jpg"/>
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/4C/5B/wKioL1Q70OHATFFtAADXd8PwZVE267.jpg "title=" 3.png " alt= "Wkiol1q70ohatfftaadxd8pwzve267.jpg"/>
Five, rhel2 (monitored side) configuration steps:
(1.) Modify the Services file: vim/etc/services, add the following line at the end:
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/4C/5A/wKiom1Q7z_aB8fFUAAAcbrDX7sc055.jpg "title=" 2.png " alt= "Wkiom1q7z_ab8ffuaaacbrdx7sc055.jpg"/>
(2.) Modify the Nrpe configuration file: Vim/etc/xinetd.d/nrpe:
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/4C/5A/wKiom1Q70cXjjzHCAAA5pIXKOLc831.jpg "title=" 2.png " alt= "Wkiom1q70cxjjzhcaaa5pixkolc831.jpg"/>
(3.) Start the XINETD service:
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/4C/5A/wKiom1Q70pyDYkZeAABFiAVhuOM138.jpg "title=" 2.png " alt= "Wkiom1q70pydykzeaabfiavhuom138.jpg"/>
(4.) to see if Port 5666 is already in the listening state:
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/4C/5A/wKiom1Q706fSh4E9AABWGZKifNw639.jpg "title=" 2.png " alt= "Wkiom1q706fsh4e9aabwgzkifnw639.jpg"/>
(5.) to test if the Nrpe is working properly, if the following message appears:
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/4C/5A/wKiom1Q71HCCWmmaAAB2CflUmds175.jpg "title=" 2.png " alt= "Wkiom1q71hccwmmaaab2cflumds175.jpg"/>
Vi. Client (Windows monitored segment) configuration steps:
(1.) Install the client software NSCP:
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/4C/5A/wKiom1Q72VnB9H3bAAGTFaGEKjI238.jpg "title=" 2.png " alt= "Wkiom1q72vnb9h3baagtfagekji238.jpg"/>
Vii. Test Results:
(1.) Login to Nagios's Web management interface:
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/4C/5A/wKiom1Q73pHh4yBuAAKxqbPWTdA501.jpg "title=" 3.png " alt= "Wkiom1q73phh4ybuaakxqbpwtda501.jpg"/>
(2.) View the monitored host status:
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/4C/5A/wKiom1Q73trTQt-QAAYLOIzZjc8223.jpg "title=" 3.png " alt= "Wkiom1q73trtqt-qaayloizzjc8223.jpg"/>
(3.) If the Web page is garbled, add: Adddefaulcharset utf-8 at the end of the Apache master configuration file.
This article from "Operation and maintenance Study" blog, reproduced please contact the author!
Nagios installation Configuration