自拍偷在线精品自拍偷,亚洲欧美中文日韩v在线观看不卡

Cacti配置Threshold(Thold)并e-mail報(bào)警

運(yùn)維 系統(tǒng)運(yùn)維
都知道Cacti是一套基于PHP,MySQL,SNMP及RRDTool開(kāi)發(fā)的網(wǎng)絡(luò)流量監(jiān)測(cè)圖形分析工具。那你試過(guò)Cacti配置Threshold(Thold)并e-mail報(bào)警,下面文章會(huì)教大家具體方法!

Cacti配置Threshold(Thold)并e-mail報(bào)警操作起來(lái)是比較簡(jiǎn)單的!

  Cacti的安裝各位google一下,這里就不詳細(xì)介紹了.

  我的 cacti文件放在/web/c/cacti/

  #打cacti-plugin-arch補(bǔ)丁

  cd /root/install/cacti

  wget http://cactiusers.org/downloads/cacti-plugin-arch.tar.gz

  tar -xzvf cacti-plugin-arch.tar.gz

  cp cacti-plugin-arch/cacti-plugin-0.8.7b-PA-v2.1.diff /web/c/cacti/

  mysql -ucacti -pcactipw cacti < cacti-plugin-arch/pa.sql

  cd /web/c/cacti/

  patch -p1 -N < cacti-plugin-0.8.7b-PA-v2.1.diff

  完成!

  安裝settings插件

  cd /root/install/cacti

  wget http://mirror.cactiusers.org/downloads/plugins/settings-0.5.tar.gz

  tar -xzvf settings-0.5.tar.gz

  mv settings /web/c/cacti/plugins/

  vi /web/c/cacti/include/global.php //添加插件信息$plugins[] = 'settings';

  完成!

  安裝Threshold插件

  V0.3.9下載地址:http://mirror.cactiusers.org/downloads/plugins/thold-0.3.9.tar.gz

  cd /root/install/cacti

  wget http://mirror.cactiusers.org/downloads/plugins/thold-0.3.9.tar.gz

  tar -xzvf thold-0.3.9.tar.gz

  mv thold /web/c/cacti/plugins/

  vi web/c/cacti/include/global.php

  #---

  $database_type = "mysql";

  $database_default = "cacti";

  $database_hostname = "localhost";

  $database_username = "cacti";

  $database_password = "cactipw";

  $database_port = "3306";

  /* Default session name - Session name must contain alpha characters */

  $cacti_session_name = "Cacti";

  $plugins = array();

  $plugins[] = 'settings';

  $plugins[] = 'thold';

  #---

  設(shè)置數(shù)據(jù)庫(kù)信息以及插件.

  mysql -ucacti -pcactipw cacti < /web/c/cacti/plugins/thold/thold.sql

  完成!

  安裝Threshold插件,只需將解壓出來(lái)的Thold目錄拷貝到cacti/plugins/目錄下,并修改cacti配置文件(cacti目錄下的include/config.php).在配置中查找$plugins = array();行,在此行下面加入:

  $plugins[] = ‘thold’;

  再導(dǎo)入數(shù)據(jù)庫(kù).

  刷新cacti首頁(yè),你將看到多出來(lái)一個(gè)Threshld選項(xiàng)卡.如下所示

  

Thold已經(jīng)被識(shí)別

 

#p#

  配置過(guò)程:

  1.設(shè)置Threshold插件:選中console選項(xiàng)卡,在左側(cè)菜單中點(diǎn)擊Settings,然后點(diǎn)擊Alerting/Thold選項(xiàng)卡

  2.設(shè)置發(fā)送警報(bào)通知:在Default Alerting Options中選擇Send notifications

  3.設(shè)置出現(xiàn)down機(jī)的情況時(shí)(即Monitor出現(xiàn)如圖所示 )發(fā)送警報(bào)通知:選擇Dead Hosts notifications

  報(bào)警郵件范例如下:

  Host Error : 192.168.1.206 (192.168.1.206) is DOWN

  Message : Host did not respond to SNMP (down機(jī)報(bào)警)

  Host Notice : 192.168.1.207 (192.168.1.207) returned from DOWN state (恢復(fù))

  4.設(shè)置警報(bào)發(fā)送純文本的電子郵件沒(méi)有圖(默認(rèn)是HTML電子郵件與圖表嵌入在電子郵件):選擇Send alerts as text

  5.設(shè)置周末不執(zhí)行報(bào)警檢查:選擇Weekend exemptions

  6.設(shè)置報(bào)警的門檻:Default Trigger Count

  7.設(shè)置Emailing Options

  Mail Services:SMTP.(可以選擇PHP mail,sendmail,SMTP三種方式)

  From Email Address:按實(shí)際設(shè)置

  From Name:按需要設(shè)置(該處顯示的name就是email的發(fā)件人姓名)

  8.進(jìn)入Mail / DNS 標(biāo)簽

  設(shè)置Sendmail Options(Mail Services設(shè)置為sendmail需設(shè)置此項(xiàng))

  Sendmail Path:/usr/sbin/sendmail(路徑是服務(wù)器上Sendmail的,僅用于郵件服務(wù)選定為Sendmail)

  9.設(shè)置SMTP Options(Mail Services設(shè)置SMTP需設(shè)置此項(xiàng))

  SMTP Hostname:SMTP服務(wù)器如:mail.test.com

  SMTP Port:25

  SMTP Username: 通過(guò)SMTP發(fā)送郵件用來(lái)驗(yàn)證的用戶名,如果你不要求身份驗(yàn)證留空

  SMTP Password:通過(guò)SMTP發(fā)送郵件用來(lái)驗(yàn)證的密碼,如果你不要求身份驗(yàn)證留空

  

Thold,smtp設(shè)置

 

  測(cè)試:點(diǎn)擊Send a Test Email,測(cè)試成功如下所示:

  收到的測(cè)試郵件范例:

  This is a test message generated from Cacti. This message was sent to test the configuration of your Mail Settings.

  Your email settings are currently set as follows

  Method: SMTP

  Host: mail.xok.la

  Port: 25

  Authenication: true

  Username: xok.la

  Password: (Not Shown for Security Reasons)

  配置完成后別忘記save.

  下面我以進(jìn)程報(bào)警為例,來(lái)設(shè)置具體的報(bào)警信息(CPU,DISK,服務(wù),網(wǎng)絡(luò)等等)

  在console選項(xiàng)卡下左側(cè)菜單中點(diǎn)擊Threshold Templates .

  

Threshold Templates

 

  如果沒(méi)有出現(xiàn)Threshold Templates選項(xiàng),那么有可能你還沒(méi)有導(dǎo)入插件的數(shù)據(jù)庫(kù)文件.

  在如下圖所示中點(diǎn)擊Add按鈕來(lái)添加一個(gè)Threshold模板

  

cacti,Threshold

 

  添加進(jìn)程監(jiān)控的模板,無(wú)論是linux還是windows都是使用的Host MIB - Processes

  

cacti,Threshold

 

  可以選擇proc

  

cacti,Threshold

 

  我設(shè)置的300個(gè)***進(jìn)程

  

cacti,Threshold

 

  Alert E-Mail 寫上通知的郵件地址即可.然后保存.

#p#

  應(yīng)用剛才創(chuàng)建的Threshold模板

  在console選項(xiàng)卡下點(diǎn)擊Management ->Devices,選擇要應(yīng)用此模板的Host,點(diǎn)擊最上面的Create Graphs for this Host鏈接,然后點(diǎn)擊Auto-create thresholds鏈接來(lái)應(yīng)用剛創(chuàng)建的Threshold模板.

  需要做的是,監(jiān)控的主機(jī)要設(shè)置監(jiān)控磁盤,如Associated Graph Templates ———- Host MIB - Processes 要選上,不然thold取不到數(shù)據(jù)的.

  設(shè)置完成后在console選項(xiàng)卡下左側(cè)菜單中點(diǎn)擊Thresholds,在此可以管理已創(chuàng)建的警報(bào),如下:

  

cacti,Threshold

 

  看第1條,Processes [proc] 300 ,超過(guò)300個(gè)進(jìn)程數(shù),出現(xiàn)紅色警告了,那我們?nèi)タ此袥](méi)有發(fā)信呢?

  

cacti,Threshold

 

  果然收到信件了…到此配置完成!

通過(guò)上面一步一步的安裝和配置,想必大家都學(xué)會(huì)了Cacti配置Threshold(Thold)并e-mail報(bào)警!

【編輯推薦】

責(zé)任編輯:趙鵬 來(lái)源: 網(wǎng)絡(luò)轉(zhuǎn)載
相關(guān)推薦

2010-06-02 15:15:05

Sendmail 配置

2010-06-02 14:19:50

Sendmail 配置

2010-06-02 15:02:42

Sendmail 配置

2009-10-28 15:38:30

VB.NET網(wǎng)絡(luò)

2010-05-31 15:21:17

Cacti配置

2009-02-19 21:06:33

計(jì)算機(jī)英語(yǔ)E-mail地址符號(hào)研究

2012-09-26 10:19:27

2012-08-20 15:52:58

2011-04-01 15:42:12

CactiNagios

2011-04-02 14:21:46

Cacti配置

2011-03-25 15:01:43

2011-03-29 10:22:34

zabbix報(bào)警

2011-03-25 15:01:44

Cacti安裝

2011-03-25 13:40:28

Cacti安裝配置

2011-03-29 09:08:49

Linux配置Cacti

2011-04-02 15:17:59

2010-06-07 09:08:38

Cacti配置

2011-04-02 15:26:51

Cacti安裝

2011-04-02 15:26:58

Cacti安裝

2010-06-07 15:12:12

Cacti配置
點(diǎn)贊
收藏

51CTO技術(shù)棧公眾號(hào)