Linux監視軟體Monitorix在CentOS下的安裝

來源:互聯網
上載者:User

1、在CentOS下設定一個安裝源,便於yum命令的使用
#vi /etc/yum.repos.d/CentOS-Base.repo
#在檔案末尾增加以下部分
[dag]
name=Dag RPM Repository for Red Hat Enterprise Linux
baseurl=http://apt.sw.be/RedHat/el$releasever/en/$basearch/dag
gpgcheck=1
gpgkey=http://dag.wieers.com/rpm/packages/RPM-GPG-KEY.dag.txt
enabled=1

2、使用YUM 安裝一下軟體
yum install rrdtool rrdtool-perl perl-libwww-perl perl-MailTools perl-MIME-Lite perl-CGI perl-DBI perl-XML-Simple perl-Config-General perl-HTTP-Server-Simple wget

3、下一步,使用wget命令,下載最新版本的'Monitorix'程式包。
例如:# wget http://www.monitorix.org/monitorix-3.4.0-1.noarch.rpm
一旦成功下載,使用rpm命令安裝它。
# rpm -ivh monitorix-3.4.0-1.noarch.rpm
一旦成功安裝,請查看一下主設定檔'/etc/monitorix.conf',根據你的系統添加一些額外的設定,啟用或禁用圖形。
最後,將Monitorix服務添加到系統啟動項,並使用下面兩個命令來開啟這項服務。
# chkconfig --level 35 monitorix on
# service monitorix start
一旦你開啟了這項服務,該程式會開始根據'/etc/monitorix.conf'檔案裡面的配置集,收集系統資訊;幾分鐘過後,
你會開始在以下位置,從瀏覽器看到系統圖形:
http://localhost:8080/monitorix/
如果你有處於啟用狀態的SELinux,那麼圖形看不見,你會在'/var/log/messages'或'/var/log/audit/audit.log'檔案中看到大量的錯誤資訊,
這些錯誤資訊顯示了訪問RRD資料庫檔案被拒絕。想清除這類錯誤資訊和右見的圖形,你就需要禁用SELinux。
想關閉SELinux,只要在'/etc/selinux/config'檔案中將"enforcing"這一行改成"disabled"。
SELINUX=disabled
上面這一更改會臨時禁用SELinux,直到你重啟機器為止。如果你希望系統總是在禁用模式下開啟,就要重啟系統。
要想同時監控多個linux主機 。需要在要每個linux主機上安裝"monitorix",並修改其中一個linux主機的設定檔:monitorix.conf。
找到並修改成以下內容:
<multihost>
enabled = n    //將enable改成y
footer_url = y
graphs_per_row = 2
remotehost_list = server 1
<remotehost_desc>
1=http://172.16.0.102:8080,/,/              //這裡更改為要監控的主機IP地址:
</remotehost_desc>
groups = n
remotegroup_list = My Group
<remotegroup_desc>
0 = server 2, server 3
</remotegroup_desc>
</multihost>

Monitorix 的詳細介紹:請點這裡
Monitorix 的:請點這裡

Monitorix 監控你的 Linux 主機狀況

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在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.