Saturday, January 19, 2013

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 application for 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

19 comments:

  1. i am getting SNMP error when creating graph in cacti. please help

    ReplyDelete
    Replies
    1. http://myconfigure.blogspot.com/2013/06/how-to-install-snmp-agent.html

      Delete
    2. i have installed on ubuntu but error comes snmp error, can you please tell me how to fix it.

      Thanks

      Delete
    3. how can I help you, if you just say error, like that... can't you explain it more details....???

      Delete
  2. i am going to create device in cacti when i click save it says snmp error, if you can tell me the configuration will appreciate it.

    Thank,

    ReplyDelete
    Replies
    1. first, you must to install snmp agent in the device
      please read this link carefully.
      http://myconfigure.blogspot.com/2013/06/how-to-install-snmp-agent.html

      Delete
    2. i am using ubuntu and this link is for windows please provide me for ubuntu.


      Thanks

      Delete
    3. on the terminal.
      snmpwalk -c public -v1 localhost
      what's the output / result ?

      Delete
    4. it says root@ubuntu:/home/test# snmpwalk -c public -v1 localhost
      Timeout: No Response from localhost
      root@ubuntu:/home/test#

      Delete
    5. that's mean you didn't install the snmp/snmpd.
      look at the above how to install and configure the snmpd...
      please read the post before make question....

      Delete
    6. i am new in ubuntu, i think the configuration is ok .

      # AGENT BEHAVIOUR
      #

      # Listen for connections from the local system only
      agentAddress udp:127.0.0.1:161
      # Listen for connections on all interfaces (both IPv4 *and* IPv6)
      #agentAddress udp:161,udp6:[::1]:161


      Delete
  3. Replies
    1. what's ubuntu's version that you are using... ?

      Delete
  4. i am using Ubuntu 14.04

    ReplyDelete
    Replies
    1. Don't edit the file snmpd.conf. let it default..
      I used Ubuntu 14.04.2, yesterday. and it's working by default.

      Delete
    2. so what should i do now to resolve the issue.

      Thanks

      Delete
    3. after reinstalling the ubuntu is the problem will solve ?

      Thanks

      Delete
  5. i am getting snmp error on cacti. please help .

    Thanks,

    ReplyDelete