關(guān)于Nagios的NRPE服務(wù)端客戶端安裝-創(chuàng)新互聯(lián)

Nagios 安裝

創(chuàng)新互聯(lián)成立以來(lái)不斷整合自身及行業(yè)資源、不斷突破觀念以使企業(yè)策略得到完善和成熟,建立了一套“以技術(shù)為基點(diǎn),以客戶需求中心、市場(chǎng)為導(dǎo)向”的快速反應(yīng)體系。對(duì)公司的主營(yíng)項(xiàng)目,如中高端企業(yè)網(wǎng)站企劃 / 設(shè)計(jì)、行業(yè) / 企業(yè)門(mén)戶設(shè)計(jì)推廣、行業(yè)門(mén)戶平臺(tái)運(yùn)營(yíng)、成都APP應(yīng)用開(kāi)發(fā)、成都手機(jī)網(wǎng)站制作、微信網(wǎng)站制作、軟件開(kāi)發(fā)、達(dá)州電信機(jī)房等實(shí)行標(biāo)準(zhǔn)化操作,讓客戶可以直觀的預(yù)知到從創(chuàng)新互聯(lián)可以獲得的服務(wù)效果。

  準(zhǔn)備條件: Development Libraries

           Development Tools

  解決依賴關(guān)系: httpd gcc glibc glibc-common gd gd-devel php mysql mysql-server

  開(kāi)始

         [root@localhost Desktop] groupadd nagcmd

         [root@localhost Desktop] useradd —G nagcmd nagios

         [root@localhost Desktop] passwd nagios

         [root@localhost Desktop] usermod -a -G nagcmd apache

         解壓文件

         [root@localhost Desktop] cd nagios-4.1.1

         [root@localhost nagios-4.1.1] ./configure --sysconfdir=/etc/nagios --with-command-group=nagcmd --enable-event-broker

         [root@localhost nagios-4.1.1] make all

         [root@localhost nagios-4.1.1] make install #安裝nagios

         [root@localhost nagios-4.1.1] make install-init #安裝nogios的

         [root@localhost nagios-4.1.1] make install-commandmode #安裝命令模式 的

         [root@localhost nagios-4.1.1] make install-config #安裝配置文件的

         [root@localhost nagios-4.1.1]# make install-webconf  #會(huì)在/etc/httpd/conf.d/下生成nagios.conf

         創(chuàng)建一個(gè)登陸nagios web 程序的用戶,這個(gè)用戶賬號(hào)在以后通過(guò)web 登陸nagios認(rèn)證時(shí)所用 ,這里的創(chuàng)建路徑要與 /etc/httpd/conf.d/nagios.conf里面的路徑相同

          [root@localhost share]# htpasswd -c /etc/nagios/htpasswd.users nagiosadmin

          # 安裝插件

            解壓文件

            [root@localhost src]#  cd nagios-plugins-1.4.16

            [root@localhost src]# ./configure --with-nagious-user=nagios --with-nagios-group=nagios

            [root@localhost src]#  make

            [root@localhost src]#  make install

            [root@localhost nagios-plugins-1.4.16]# service httpd  restart

            [root@localhost nagios-plugins-1.4.16]# service nagios restart

      <!--  注意: nagios里面有cgi腳本,而selinux 會(huì)阻止所以要關(guān)閉selinux-->

Nagios 配置文件講解

  配置文件所在地: /etc/nagios (與./configure的時(shí)候?qū)懙奈恢脤?duì)比)

  主配置文件: nagios.cfg

  命令對(duì)象 : commands.cfg

        格式 define command {

             command_name   # 名字

             command_line    # 命令

         }

       contacts.cfg

         格式:denfine contact{

                    contact_name  #名字全局唯一

                    use  #繼承那個(gè)模板

                    alias  #起一個(gè)描述名字

                    email  接受通知的郵箱地址

              }

   時(shí)間: timeperios.cfg

         格式: define timeperiod {

                timeperiod_name

                alias

                sunday

                monday

                tuesday

                wednesday

                thursday

                friday

                saturday

           }

   主機(jī): localhost.cfg

        格式: define host{

                  use

                  host_name

                  alias

                  address

               }

    服務(wù): localhost.cfg

        主機(jī)格式: define host {

                  use

                  host_name

                  alias

                  address

               }

        服務(wù)格式:

           格式: define service{

                  use

                  host_name

                  service_description

                  check_command

               }

        <!-- 帶register 0 就是模板-->

客戶端安裝插件

  <!--先安裝openssl-devel包-->

1)創(chuàng)建用戶

          [root@localhost src]useradd nagios

          [root@localhost src]passwd nagios

2)解壓插件包并進(jìn)入安裝插件

          [root@localhost src]tar -xvf nagios-plugins-1.4.15.tar.gz

          [root@localhost src] cd nagios-plugins-1.4.15

          [root@localhost nagios-plugins-1.4.15]./configure --enable-redhat-pthread-workaround

          [root@localhost nagios-plugins-1.4.15] make

          [root@localhost nagios-plugins-1.4.15]make install

3)解壓NRPE包并進(jìn)入安裝NRPE

         [root@localhost src]# tar -xvf nrpe-2.14.tar.gz

         [root@localhost src]# cd nrpe-2.14

         [root@localhost src]# ./configure --with-prefix=/usr/local/nagios --enable-command-args

         [root@localhost nrpe-2.14]# make all

         [root@localhost nrpe-2.14]#  make install-plugin ##安裝check_nrpe 這個(gè)插件

         [root@localhost nrpe-2.14]#  make install-daemon ##安裝deamon

         [root@localhost nrpe-2.14]#  make install-xinetd ##安裝超級(jí)進(jìn)程

         [root@localhost nrpe-2.14]#  cp /usr/src/nrpe-2.14/init-script /etc/init.d/nrpe

         [root@localhost nrpe-2.14]#  chmod +x /etc/init.d/nrpe

         [root@localhost nrpe-2.14]#  make install-daemon-config  ##安裝配置文件

4)修改目錄權(quán)限

         [root@localhost nrpe-2.14]# chown nagios:nagios /usr/local/nagios/

         [root@localhost nrpe-2.14]# chown -R nagios:nagios /usr/local/nagios/libexec/

5) 編輯nrpe配置文件

  [root@localhost nrpe-2.14]# vim /usr/local/nagios/etc/nrpe.cfg

       allowed_hosts=127.0.0.1,172.16.9.128

  ##以下兩步是如果把NRPE服務(wù)交給超級(jí)進(jìn)程要更改的

  [root@localhost nrpe-2.14]# vim /etc/services

   nrpe      5666/tcp

  [root@localhost nrpe-2.14]# vim /etc/xinetd.d/nrpe

     only_from    = 127.0.0.1 172.16.9.128

服務(wù)器安裝插件

1)解壓進(jìn)入

  [root@localhost src]# tar -xvf nrpe-2.14.tar.gz

  [root@localhost src]# cd nrpe-2.14

2)安裝check_nrpe 插件

        [root@localhost nrpe-2.14]# ./configure

        [root@localhost nrpe-2.14]# make all

        [root@localhost nrpe-2.14]# make install-plugin

3) 測(cè)試

       [root@localhost nrpe-2.14]# /usr/local/nagios/libexec/check_nrpe -H 172.16.9.129

另外有需要云服務(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)欄目:關(guān)于Nagios的NRPE服務(wù)端客戶端安裝-創(chuàng)新互聯(lián)
文章分享:http://www.muchs.cn/article24/dpgsce.html

成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供定制網(wǎng)站、小程序開(kāi)發(fā)、關(guān)鍵詞優(yōu)化外貿(mào)建站、品牌網(wǎng)站建設(shè)、網(wǎng)站設(shè)計(jì)公司

廣告

聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請(qǐng)盡快告知,我們將會(huì)在第一時(shí)間刪除。文章觀點(diǎn)不代表本網(wǎng)站立場(chǎng),如需處理請(qǐng)聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時(shí)需注明來(lái)源: 創(chuàng)新互聯(lián)

網(wǎng)站建設(shè)網(wǎng)站維護(hù)公司