Tuesday, May 20, 2014

Install Snmp & Cacti on Ubuntu 12.10

What is Cacti ??

Cacti is an open-source, web-based network monitoring and graphing tool designed as a front-end applicationfor the open-source, industry-standard data logging tool RRDtool. Cacti allows a user to poll services at predetermined intervals and graph the resulting data. It is generally used to graph time-series data of metrics such as CPU load and network bandwidth utilization. A common usage is to monitor network traffic by polling a network switch or router interface via simple network management protocol (SNMP). (wikipedia)
Cacti is a complete frontend to RRDTool, it stores all of the necessary information to create graphs and populate them with data in a MySQL database. 
The frontend is completely PHP driven. Along with being able to maintain Graphs, Data Sources, and Round Robin Archives in a database, cacti handles the data gathering. There is also SNMP support for those used to creating traffic graphs with MRTG. (www.cacti.net)

Install Cacti.

I assume you have installed a fresh Linux, and it's working very well.
1. update, and install support /dependecies file  
# apt-get update
# apt-get install mc vim openssh-server

apt-get install mc vim openssh-server

2. Install snmp and cacti. 
# apt-get install snmp snmpd cacti

apt-get install snmp snmpd cacti

Run snmpwalk, snmpwalk -c public -v <your-ip-address>
# snmpwalk -c public -v1 10.10.0.254
   Timeout: No Response from 10.10.0.254
That's mean, you must to configure /etc/snmp/snmpd.conf. 
vim /etc/snmp/snmpd.conf
Make sure, some line below exist on snmpd.conf
     agentAddress  udp:127.0.0.1:161,udp:10.10.0.254:161
     ........................................
     ....................................
     view   systemonly  included   .1.3.6.1.2.1.1
     view   systemonly  included   .1.3.6.1.2.1.25.1
     view   all    included  .1                               80

    #rocommunity public  localhost                #  Full access from the local host
     rocommnunity public                                # Full access for everyone  

Save and restart snmpd
# service snmpd restart
# snmpwalk -c public -v1 10.10.0.254
You will get a lot of data, which will be captured by cacti
  
3. configure mysql
password for mysql root user

repeat password for mysql root user

4. Configure database for cacti
configure database for cacti

5. Be careful on this step... Password administrator is the same as password root mysql 
password administrator same as root user

6. Fill Password for user and database cacti, that is different from the root password / administrator password.
password for cacti user
repeat password for cacti user

7. Go to browser, http://your-ip-address/cacti/. And follow the instructions.
cacti installation guide
cacti installation guide 2

cacti installation guide 3


8. Use, username admin and password admin,  to login on page login cacti
user login

9. Reset password for user admin
user login - new password
10. Welcome to Cacti
welcome to cacti

0 comments: