This how to shows how to install and setup CACTI. CACTI is a monitoring tool that displays trends in the form of graphics. It can display trends for network, CPU, memory, disk activity.
Step 1) Install required packages. -Install apache, php, mysql, snmp
1 |
yum install httpd httpd-devel mysql mysql-server php-mysql php-pear php-common php-gd php-devel php php-mbstring php-cli php-mysql php-snmp net-snmp-utils p net-snmp-libs php-pear-Net-SMTP rrdtool |
- Install EPEL repo in order to install CACTI
1
2
3 |
wget http: //download .fedoraproject.org /pub/epel/6/x86_64/epel-release-6-8 .noarch.rpm rpm -ivh epel-release-6-8.noarch.rpm yum install cacti |
Step 2) Configure MySQL database. -Setup Password, create/import the CACTI database tables
- Setup password on MySQL database
1 |
mysqladmin -u root password Enter_Your_Password_Here |
- Create the CACTI database and user.
1
2
3
4
5 |
mysql -u root -p mysql> create database cacti; mysql> GRANT ALL ON cacti.* TO cacti@localhost IDENTIFIED BY 'your-password-here' ; mysql> FLUSH privileges; mysql> quit; |
- Import the CACTI tables to your newly create database.
1 |
mysql -u cacti -p cacti < /usr/share/doc/cacti-0 .8.8a /cacti .sql |
Step 3) Prepare Apache for the CACTI installation. -Edit the following file and enter the lines below. Your network will be different.
1 |
vi /etc/httpd/conf .d /cacti .conf |
1
2
3
4
5
6
7 |
Alias /cacti /usr/share/cacti <directory usr= "" share= "" cacti= "" > Order Deny,Allow Deny from all Allow from 10.0.0.0 /26 < /directory > |
1 |
service httpd restart |
Step 4) Setup SNMP on the CACTI server and on your client.
- On the server and on the client clear the file of the current settings and enter the following lines. Pay attention to the "community" parameter. I called mine "mylan".
1
2
3
4
5
6
7
8 |
# A user 'myUser' is being defined with the community string 'myCommunity' and source network 10.0.0.0/26 com2sec myUser 10.0.0.0 /26 mylan # myUser is added into the group 'myGroup' and the permission of the group is defined group myGroup v1 myUser group myGroup v2c myUser view all included .1 access myGroup "" any noauth exact all all none |
1 |
service snmpd restart |
Step 5) Start the CACTI installation. - Enable cronjobs and start the web based installation.
- Enable the following cronjob under root.
1 |
vi /etc/cron .d /cacti |
1 |
* /5 * * * * cacti /usr/bin/php /usr/share/cacti/poller .php > /dev/null 2>&1 |
Step 5) Run the web installer of CACTI.
Point your browser to your cacti server. In my case will be http://10.0.0.14/cacti
- Select New Install
- The following page will do a check for binaries/libraries it requires. Make sure everything comes back as green.
- Enter the default username/password. The default login is admin and the default password is admin. You will be prompted to change your password.
Step 6) Add a remote server to monitor.
- Select the "Devices" link and press Select "Add"
Below is a sample of my setup.
- Define types of queries you want CACTI to perform on your remote server.Add the following items and then select "Create new Graph for this host
출처 : http://www.sfentona.net/?p=2020
'Security > Monitoring' 카테고리의 다른 글
[Cacti] Install and Configure Cacti 설치하다 발생한 문제 (0) | 2014.12.04 |
---|---|
[Cacti] Cannot connect to MySQL server on 'localhost'... (0) | 2014.12.04 |
[Monitoring] Java SNMP Programming (0) | 2014.12.03 |
[Monitoring] RRDTOOL + MRTG 트래픽 페이지 보기 (CentOS6.5) (0) | 2014.12.03 |
[Monitoring] RRDtool의 기본 개념 (0) | 2014.11.29 |
댓글