Snmp In Linux

SNMP (Simple Network Management Protocol) is used to collect data on a device such as a hard drive status, Load, Bandwidth. The data used by applications such as network monitoring Data to produce shaped Kaktus graphs for monitoring purposes.

Special use on Kaktus and SNMP, there must be one or more SNMP-enabled devices, and a separate monitoring server Kaktus will collect the feeds from the SNMP device. Please note that all the devices to be in monitoring then have to enable SNMP. In this tutorial, I will configure the Kaktus and SNMP on a Linux Server to demonstrate.

SNMP configuration on Debian or Ubuntu
To install SNMP (snmpd) on a Debian-based System, run the following command
# apt-get install snmpd

Then edit the following section
# nano /etc/snmp/snmpd.conf

# this will make snmpd listen on all interfaces
agentAddress udp:161
# a read only community 'myCommunity' and the source network is defined
rocommunity myCommunity #Local IP Network
sysLocation Earth

When you finish editing the file, restart the snmpd service
# service snmpd restart

SNMP configuration on CentOS or RHEL

To install SNMP tools, run the following command
# yum install net-snmp

Then edit the file "snmpd.conf"
# vim /etc/snmp/snmpd.conf

# A user 'myUser' is being defined with the community string 'myCommunity' and source network
com2sec myUser myCommunity
# myUser is added into the group 'myGroup' and the permission of the group is defined
group myGroup v1 myUser
group myGroup v2c myUser
view all included .1
access myGroup "" any noauth exact all all none

Then restart and activate SNMP service
# service snmpd restart
# chkconfig snmpd on

Testing SNMP
SNMP can be tested by running the command snmpwalk. If SNMP is already successfully configured, this command will be me-generate tons in output.
# snmpwalk -c myCommunity -v1

Click here for Comments