Artyom
11-06-2008, 01:28 PM
After installing net-snmpd using apt-get (apt-get install snmpd), you need to edit two files:
/etc/default/snmpd
/etc/snmp/snmpd.conf
In the /etc/default/snmpd you need to make sure you have the following two lines:
SNMPDRUN=yes
SNMPDOPTS='-Lsd -Lf /dev/null -u snmp -I -smux -p /var/run/snmpd.pid'
In the /etc/snmp/snmpd.conf you need to make sure you have the following lines configured:
# sec.name source community
#com2sec paranoid default public
#com2sec local localhost public
#com2sec localNet 10.0.0.34 public
com2sec readonly CactiIP mycommunity
#com2sec readwrite default private
Please replace CactiIP and mycommunity with your correct values. Make sure to comment out the rest of the com2sec lines.
#group MyROSystem v1 local
#group MyROSystem v2c local
#group MyROSystem usm local
#group MyROGroup v1 localnet
#group MyROGroup v2c localnet
#group MyROGroup usm localnet
group MyRWGroup v1 local
#group MyRWGroup v2c local
#group MyRWGroup usm local
group MyROGroup v1 readonly
#group myROGroup v2c readonly
#group myROGroup usm readonly
The most important part here is to use the correct snmp version you use to monitor via your Cacti instance. In this case, we use version 1 (v1). It's also important to note that you need to use the same sec.name as you used in your com2sec line. In our case, it's readonly. Comment out the unneeded lines as well.
# incl/excl subtree mask
view all included .1 80
#view system included .iso.org.dod.internet.mgmt.mib-2.system
The above two lines should already be there. You just need to comment out the second line.
After this is done, save this file and start up snmpd. You should be all set.
NOTE: Make sure that on the monitored server, you open up incoming udp port 161 as well as add your main Cacti server's IP to the /etc/hosts.allow file.
/etc/default/snmpd
/etc/snmp/snmpd.conf
In the /etc/default/snmpd you need to make sure you have the following two lines:
SNMPDRUN=yes
SNMPDOPTS='-Lsd -Lf /dev/null -u snmp -I -smux -p /var/run/snmpd.pid'
In the /etc/snmp/snmpd.conf you need to make sure you have the following lines configured:
# sec.name source community
#com2sec paranoid default public
#com2sec local localhost public
#com2sec localNet 10.0.0.34 public
com2sec readonly CactiIP mycommunity
#com2sec readwrite default private
Please replace CactiIP and mycommunity with your correct values. Make sure to comment out the rest of the com2sec lines.
#group MyROSystem v1 local
#group MyROSystem v2c local
#group MyROSystem usm local
#group MyROGroup v1 localnet
#group MyROGroup v2c localnet
#group MyROGroup usm localnet
group MyRWGroup v1 local
#group MyRWGroup v2c local
#group MyRWGroup usm local
group MyROGroup v1 readonly
#group myROGroup v2c readonly
#group myROGroup usm readonly
The most important part here is to use the correct snmp version you use to monitor via your Cacti instance. In this case, we use version 1 (v1). It's also important to note that you need to use the same sec.name as you used in your com2sec line. In our case, it's readonly. Comment out the unneeded lines as well.
# incl/excl subtree mask
view all included .1 80
#view system included .iso.org.dod.internet.mgmt.mib-2.system
The above two lines should already be there. You just need to comment out the second line.
After this is done, save this file and start up snmpd. You should be all set.
NOTE: Make sure that on the monitored server, you open up incoming udp port 161 as well as add your main Cacti server's IP to the /etc/hosts.allow file.