Nagios是一個受歡迎的即時監控軟體。它一開始設計就是以模組方式,因此功能多樣性可以用插件(Plugin)來擴展他的功能。設定檔是以物件 概念方式來調校。更多介紹訊息請看Nagios_Wiki
Nagios安裝很簡單,這裡用epel套件來源安裝Nagios,再用開源流行的架構LAMP,另配合perl(Nagios有很多功能以perl執行)。 為了使環境更簡單把iptable及selinux(#setenforce 0)取消掉(若要提供對外服務,強烈建議一定要打開iptable及Selinux)
#cd /etc/yum.repos.d/ #rpm -ivh http://mirror01.idc.hinet.net/EPEL/6/i386/epel-release-6-8.noarch.rpm #vim epel.repo [epel] name=Extra Packages for Enterprise Linux 6 - $basearch #baseurl=http://download.fedoraproject.org/pub/epel/6/$basearch mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=epel-6&arch=$basearch failovermethod=priority enabled=1 ==>更改為0 gpgcheck=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6 ~略~
#yum --enablerepo=epel install nagios nagios-plugins
用yum安裝,Nagios非常貼心將httpd設定檔For Nagios 寫好了 /etc/httpd/conf.d/nagios.conf,可以根據需求加以修改。 現在只要新增一個使用者帳戶來認證網頁
#htpasswd /etc/nagios/passwd nagiosadmin New password:# set password Re-type new password:
分別啟動Nagios及Httpd
#/etc/init.d/httpd start #/etc/init.d/nagios start #chkconfig nagios on && chkconfig httpd on
#yum --enablerepo=epel install nagios-plugins-ping.x86_64