Gentoo還是不錯的Linux,嘗試了在Gentoo下安裝Cacti監(jiān)控,非常便捷
#emerge cacti
#emerge net-snmp
#webapp-config -I -h localhost -d cacti cacti 0.8.7e-r3
File: <path to cacti>include/config.php
$database_type = "mysql";
$database_default = "cacti";
$database_hostname = "localhost";
$database_username = "cactiuser";
$database_password = "cactipass";
$database_port = "3306";
mysql -u root -p
mysql> create database cacti;
mysql> grant all on cacti.* to cactiuser@localhost;
mysql> set password for cactiuser@localhost=password('cactipass');
mysql> exit
Cacti目錄下
chown -R apache:apache rra/ log/
到http://www.cacti.net/downloads/patches/下載相同版本的插件管理器 PIA
解壓到Cacti目錄
mysql -uroot cacti <cacti-plugin-arch/pa.sql
patch -p1 -N <cacti-plugin-arch/cacti-plugin-0.8.7e-PA-v2.6.diff
修改Cacti目錄/include/global.php
Cacti目錄下創(chuàng)建plugins
進入plugins
下載thold,monitor,settings,discovery,hostinfo,aggregate,weathermap插件
解壓后,有數(shù)據(jù)庫的導(dǎo)入cacti數(shù)據(jù)庫
編輯global.php
再$plugins
$plugins[] =
$plugins[] =
其他插件相同
設(shè)置5分鐘采集一次數(shù)據(jù)
Nano /etc/crontab
*/5 * * * * apache php執(zhí)行程序目錄(如/usr/bin/php) /cacti目錄/poller.php > /dev/null 2>&1
聯(lián)系客服