Configuring SNMP October 21st, 2008

A while ago I tried to set Zenoss to monitor several diferent servers (Windows included) and found everything went great with CentOS and Windows but not quite right with Ubuntu. I decided to give it a try one more time and found that although I was doing everything correctly, Ubuntu has a "/etc/default/snmp" file that has some configuration properties that needed to be changed as well. I created a small script (you can download it from here) to automate a little bit the process. If you don't want to run the script, here is a list of things you need to do to have a "Read Only" SNMP configuration in Ubuntu: Install SNMP: sudo apt-get install snmp snmpd Backup the default config: sudo mv /etc/snmp/snmp.conf /etc/snmp/old.snmp.conf Create the new config: sudo echo "rocommunity public" > /etc/snmp/snmpd.conf Modify the line in /etc/default/snmpd: sed -i 's/127.0.0.1//g' /etc/default/snmpd Restart SNMP agent: sudo /etc/init.d/snmpd restart If you want to test the configuration works, try this command: snmpwalk localhost -v1 -c public system
Posted in configuration |

5 Responses to “Configuring SNMP”

  1. christof3 On

    Thanks much for this, helped me bigtime in a crunch.
    Much appreciated.

  2. Danilo Abreu On

    hey man

    u said u did a little script

    can u send me?

    my e-mail is

    danilohdds@gmail.com

    thanks for your help!!!

  3. Juju On

    I can't do this line : sudo echo "rocommunity public" > /etc/snmp/snmpd.conf. I got permission denied. Can you help me ? Thanks

  4. alfredo On

    try to be root before running it:
    First:
    sudo su

    Then:
    echo "rocommunity public" > /etc/snmp/snmpd.conf

  5. Juju On

    thanks a lot I totally forgot it !

Leave a Reply

3+4


Living Ubuntu

I discovered Ubuntu in its second release thanks to a PC Magazine Ranking. Haven't stop using GNU/Linux since. This place is where I put all the stuff that I stumble upon and fix later. Hope you find it useful.

Links

Twitter

    Follow Me