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
Thanks much for this, helped me bigtime in a crunch.
Much appreciated.
hey man
u said u did a little script
can u send me?
my e-mail is
danilohdds@gmail.com
thanks for your help!!!
I can't do this line : sudo echo "rocommunity public" > /etc/snmp/snmpd.conf. I got permission denied. Can you help me ? Thanks
try to be root before running it:
First:
sudo su
Then:
echo "rocommunity public" > /etc/snmp/snmpd.conf
thanks a lot I totally forgot it !