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. (

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
   Timeout: No Response from
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:,udp:
     view   systemonly  included   .
     view   systemonly  included   .
     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
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


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


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


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

  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.


    1. first, you must to install snmp agent in the device
      please read this link carefully.

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


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

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

    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....

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


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

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

  4. i am using Ubuntu 14.04

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

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


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


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


  6. You are an awesome blogger. This is one of the best blog I had visited so far. Hope to read more post from you in the future. Keep it up. God bless.

  7. BlueHost is ultimately one of the best web-hosting company with plans for all of your hosting needs.