部署cacti監控windows

來源:互聯網
上載者:User

標籤:cacti監控windows

一、安裝LAMP架構

本篇主要介紹cacti如何監控windows主機,cacti的搭建過程也很簡單,同樣,監控linux主機也不難。這裡主要記錄部署監控windows過程中遇到的兩個問題
1、LAMP

#yum install -y httpd php mysql-server

2、外掛程式      

 #yum install -y mysql-server  php-mysql net-snmp* zlib libpng freetype libjpeg  gd libxml2

3、安裝rrdtool

#yum -y install rrdtool

4、安裝cacti          

# tar xf cacti-0.8.8b.tar.gz -C /var/www/html/

5、資料庫授權

mysql>grant all on cacti.* to ‘cacti‘@‘localhost‘ identified by ‘cacti‘;mysql>flush privileges;mysql> create database cacti;

6、匯入資料庫

mysql cacti < /var/www/html/cacti/cacti.sql

          折騰了半天,就是因為沒有匯入資料庫
          如果不匯入資料庫,會報錯:
          PHP Fatal error:  Allowed memory size of 548405248 bytes exhausted (tried to allocate 523800 bytes) in /var/www/html/cacti/lib/adodb/adodb.inc.php on line 833
7、修改設定檔

# vim /var/www/html/cacti/include/config.php$database_type = "mysql";$database_default = "cacti";$database_hostname = "localhost";$database_username = "cacti";$database_password = "cacti";$database_port = "3306";

8、訪問cacti
    http://192.168.1.150/cacti/
     預設使用者名及密碼是admin:admin
二、監控windows主機

   防火牆開戶UDP 161(SNMP)連接埠

1、cacti用戶端配置:
   為window系統配置snmp服務及安裝snmp informant
  (1)在win2008伺服器上添加功能snmp服務,不是snmp伺服器
  (2)運行 --> services.msc --> SNMP Service
       在彈出的視窗中選擇”安全”選項卡,並設定社區為:public 
       按需要可設定接受來自任何主機的SNMP資料包或只指定個別機子. 
       然後確定並重啟SNMP Service.
  (3)解壓並安裝informant-std-16.zip
       下載連結:http://www.wtcs.org/informant/download.htm,目前是STD 1.6
2、cacti服務端配置:
  (1)下載模板
       Cacti_SNMP_Informant_Standard_Metrics_v13.zip 
       (該cacti監控模板支援WinXP/Vista/Win7/Win2000/2003/2008/2012 x32/x64) 
       : http://forums.cacti.net/download/file.php?id=26562 
  (2)解壓並匯入模板
       把template檔案夾中的6個模板檔案,通過cacit操作介面匯入,
       然後把檔案夾resource\snmp_queries中的xml檔案,放到cacti伺服器中的相應目錄,我的伺服器為/var/www/html/cacti/resource/snmp_queries
3、建立監控主機及監控資源圖
   故障:安裝、建立完成後,cacti不出圖
   解決:首先確認/var/www/html/cacti/rrd目錄是否可寫,照上文設定使用者權限;
        http://blog.sina.com.cn/s/blog_61c07ac50101cfja.html
           


本文出自 “nmshuishui的部落格” 部落格,請務必保留此出處http://nmshuishui.blog.51cto.com/1850554/1540127

相關文章

聯繫我們

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