Friday, January 29, 2010

SNMP & Cacti Configuration

Basically, i refer my SNMP and Cacti installation here. It works nicely. I would like to paste here everything i have done to make it works in my PC.

Below is how the architecture looks since I want Cacti to monitor many devices at a time. Firstly, assign one PC as manager (which Cacti will be installed) and all of devices to be monitored. They are connected using SNMP.


Below is the setting I had done to my manager:

1) Firstly, install SNMP
$sudo apt-get install snmpd

2) Then check
$sudo gedit /etc/default/snmpd

Make sure
# snmpd control (yes means start daemon).
SNMPDRUN=yes

# snmpd options (use syslog, close stdin/out/err).
SNMPDOPTS='-Lsd -Lf /dev/null -u snmp -I -smux -p /var/run/snmpd.pid 127.0.0.1'

3) Next,
$sudo gedit /etc/snmp/snmpd.conf

In the line of com2sec setting, I have adjusted as below (slightly different from How-To)
# sec.name source community
com2sec readonly localhost public

If you have your own community, you could use it for better security.

4) Check SNMP configuration
$snmpwalk -Os -c public -v 1 localhost system

(If you use your community, replace 'public' with your community name)

This command will return result something like this:


5) CACTI- Installation
I did exactly like here.

For all other devices, configure SNMP server same like above. That's all :)

3 comments:

  1. kalau nk snmpwalk dr network edit file /etc/default/snmpd buang 127.0.0.1 (listen to localhost only)

    daripada:
    # snmpd options (use syslog, close stdin/out/err).
    SNMPDOPTS='-Lsd -Lf /dev/null -u snmp -I -smux -p /var/run/snmpd.pid 127.0.0.1'

    kepada:
    # snmpd options (use syslog, close stdin/out/err).
    SNMPDOPTS='-Lsd -Lf /dev/null -u snmp -I -smux -p /var/run/snmpd.pid'

    cth:
    snmpwalk -v1 -c public 192.168.1.1

    so dekat snmpd.conf kena la edit utk network grup part:
    # sec.name source community
    com2sec local localhost public
    com2sec mynetwork 192.168.1.0/24 public

    x kan la nak monitor snmp n cacti ni dr localhost je kan? nama pon network monitoring :) juz sharing some ideas :)

    ReplyDelete
  2. owhkays.. mmg ade cari2 pn.. thanks! :)

    ReplyDelete
  3. ape lg na..kasi try la tips tu..thanks derr..

    ReplyDelete