※ 緣由:
公司原先就有一套Cacti 0.8.7e,用來監控HP EVA8400 Storage 的效能
但當初裝的時候裝的版本很精簡,任何外掛套件都沒有,
最近公司要求要將Cacti 用來監控EVA Controller CPU% 並發出Email ALERT
因為Cacti 的Email 是單獨一個外掛套件plugins (叫Settings ),
要設定Perfromace 到達一個threadhold 並觸發Alert也是另一個套件plugins (叫thold)
加上Cacti 用來管理連結這些哩哩扣扣的外掛plugins 的平台又是一個稱之為PA 的模組
※ 故本次一共有三個模組要安裝設定,分別是PA, Settings , thold
※ 於是Google 一下並實作之後,並把步驟整理如下,希望給台灣的朋友參考參考。
Step 1: arch (也就是PA,Cacti 用來連結外掛模組的平台,要裝外掛之前,要先裝這個)
Step 2: settings (DNS/MAIL 模組)
Step 3: thold ( 設定Performance 到達threadhold 後觸發Email Alert)
Step 4 : Config User management , 讓管理者帳號admin可以看到plugin 跟config threadhold
※ 未安裝套件前的Cacti , 只有Console跟Graphs 兩個page .
Step 1:
arch (也就是PA,Cacti 用來連結外掛模組的平台,要裝外掛之前,要先裝這個)
Fist install cacti-plugin-arch:
# cd /userap/home/xymon/cacti (Go to cacti folder)
# wget http://mirror.cactiusers.org/downloads/plugins/cacti-plugin-0.8.7e-PA-v2.5.zip
# unzip cacti-plugin-0.8.7e-PA-v2.5.zip
# cp -r files-0.8.7e/* /userap/home/xymon/cacti
# vi include/global.php
$config['url_path'] = '/cacti/';
( 若cacti 安裝目錄為/var/www/html/ , url_path預設值是 '/' ,
但若安裝目錄為/var/www/html/cacti , 則需修改url_path預設值為'/cacti/';
因為我的cacti home 位於 /userap/home/xymon/cacti ,
故我修改 url_path值為'/cacti/';)
# restart httpd (apachectl )
Step 2:
settings (DNS/MAIL 模組)
Install settings plugin:
Download the archive and extract it in the cacti plugins folder.
# cd /userap/home/xymon/cacti/plugins
# wget http://cactiusers.org/downloads/settings.tar.gz
# tar -xvf settings.tar.gz
Now you have to edit the global.php present in the include folder.
# vim include/global.php
$plugins = array();
$plugins[] = 'settings';
Now you can see the modification in the cacti interface:
Step 3:
thold ( 設定Performance 到達threadhold 觸發事件模組)
Install Threshold plugin :
Download the archive and extract it in the cacti plugins folder.
# cd /userap/home/xymon/cacti/plugins
# wget http://cactiusers.org/downloads/thold.tar.gz
# tar -xvf thold.tar.gz
Now you have to edit the global.php present in the include folder.
# vim include/global.php
$plugins = array();
$plugins[] = 'settings';
$plugins[] = 'thold';
Now you can see the modification in the cacti interface:
Step 4:
Config User management , 讓管理帳號admin可以看到plugin 跟config threadhold
到此階段會看到多了一個thold page , 而且settings 裡面選項也多了
4-1 ( 記得把那四個選項打勾,才可以看到Plugins 跟config thold .)
4-2 ( 可以看到多了thold page , 點選settngs 也多了 (mail/DNS , Alerting /thold )選項
4-3 ( 最後我設定了給EVA8400 Controller CPu Alert 的threadhold , 大功告成)