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 172.17.1.0/24 #Local IP Network
sysLocation Earth
sysContact email@domain.com

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 172.17.1.0/24
com2sec myUser 172.17.1.0/24 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 172.17.1.1 -v1


Next
Previous
Click here for Comments

0 comments: