nagios 安裝配置(包含nrpe端)全 (一)

來源:互聯網
上載者:User

標籤:tracking   oca   aries   安裝   建立   系統   rar   comm   click   

一、nagios安裝:

1、安裝下面命令:

這是本人監控服務時自己定義外掛程式所用到的幾個系統命令。可不安裝。

(1)iostat:監控磁碟IO資訊:


apt-getinstall sysstat


(2)ifstat:監控網路資訊:


apt-getinstall ifstat


(3)gnuplot:畫圖:


apt-getinstall gnuplot


2、確保已經安裝了下列軟體包:

  • Apache2

  • PHP

  • GCCcompiler and development libraries

  • GD development libraries

假設沒有安裝,使用 apt-get安裝這些軟體包,使用下面命令:

sudo apt-get install apache2sudo apt-get install libapache2-mod-php5sudo apt-get install build-essentialsudo apt-get install libgd2-dev或者sudo apt-get install libgd2-xpm-dev3、建立使用者資訊:成為 root使用者。建立一個nagios 使用者並設定password:/usr/sbin/useradd -m -s /bin/bash nagiospasswd nagios



加入一個新的 nagcmd 組:

/usr/sbin/groupadd nagcmd/usr/sbin/usermod -a -G nagcmd nagios/usr/sbin/usermod -a -G nagcmd www-data4、下載nagios及其外掛程式:wget http://prdownloads.sourceforge.net/sourceforge/nagios/nagios-3.2.3.tar.gzhttp://www.nagios.org/download/plugins/   中下載nagios外掛程式這兩個壓縮包在 zctech 檔案檔案夾下已經下載好。

5、編譯安裝nagios

安裝路徑為 /usr/local/

cd/usr/local

將nagios-3.2.3.tar.gz複製到/usr/local下。之後解壓縮:

tar xzf nagios-3.2.3.tar.gzcd nagios-3.2.3./configure --with-command-group=nagcmdmake allmake installmake install-initmake install-configmake install-commandmode

6、自己定義配置:

設定檔安裝在 /usr/local/nagios/etc檔案夾.

具體的配置在安裝完畢之後加入服務時。

7、配置web介面

安裝nagios web 設定檔:

make install-webconf

建立一個帳號登入web介面,記住password:

htpasswd -c /usr/local/nagios/etc/htpasswd.users nagiosadmin



重新啟動 Apache:

/etc/init.d/apache2 reload

8、編譯安裝NagiosPlugins

安裝路徑為 /usr/local/

cd/usr/local

tar xzf nagios-plugins-2.0.3.tar.gzcd nagios-plugins-2.0.3./configure --with-nagios-user=nagios --with-nagios-group=nagiosmakemake install9、啟動nagios

開機啟動:

ln -s /etc/init.d/nagios /etc/rcS.d/S99nagios

驗證設定檔:

/usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg

假設沒有錯誤,則啟動 Nagios.

/etc/init.d/nagios start10、登入web介面:地址欄輸入下面的網址。就可以登入。此時用到前面設定的帳號 ,比方nagiosadmin和password。

http://localhost/nagios/登入成功則表示nagios成功安裝。

nagios 安裝配置(包含nrpe端)全 (一)

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.