He Simple Network Management Protocol either SNMP (of the English Simple Network Management Protocol) is a protocol of the application layer which facilitates the exchange of management information between network devices. It allows administrators to monitor network performance, find and resolve network problems, and plan network growth.
The most commonly used SNMP versions are SNMP version 1 (SNMPv1) and SNMP version 2 (SNMPv2).
SNMP in its latest version (SNMPv3) has significant changes compared to its predecessors, especially in security aspects, however it has not been widely accepted in the industry.
Debian or similar
apt-get install snmp snmpdConfiguration file: /etc/snmp/snmpd.conf
We add it so that it starts automatically
update-rc.d snmpd defaultsRed-Hat o similares
yum -y install net-snmp net-snmp-utilsWe add it so that it starts automatically
chkconfig snmpd onConfiguration file: /etc/snmp/snmpd.conf
Suse or similar
yast -i net-snmpConfiguration file: /etc/snmp/snmpd.conf
We add it so that it starts automatically
chkconfig snmpd onSlackware
wget http://ftp.lip6.fr/pub/linux/distributions/slackware/slackware-13.1/source/n/net-snmp/net-snmp-5.5.tar.xzinstallpkg net-snmp-5.5.tar.xzOr also through slip-get
slapt-get --install net-snmpArchLinux
pacman -S net-snmpBSD
cd /usr/ports/net-mgmt/net-snmp
make
make install
make cleanWe add it so that it starts automatically
vi /etc/rc.confAnd we add the following:
snmpd_enable="YES"
snmpd_conffile="/usr/local/etc/snmpd.conf"Configuration file: /usr/local/etc/snmpd.conf
We copy the template
cp /usr/local/share/snmp/snmpd.conf.example /usr/local/etc/snmpd.confInstall on Solaris
./configure --with-mib-modules="ucd-snmp/lmSensors ucd-snmp/diskio \
smux mibII/mta_sendmail" --with-cc=gccMake && make installConfiguration file: /etc/sma/snmp/snmpd.conf
We copy the configuration template
/etc/sma/snmp/snmpd.conf.dist /etc/sma/snmp/snmpd.confFrom Source Code
We download net-snmp
wget http://sourceforge.net/projects/net-snmp/files/net-snmp/5.6.1.1/net-snmp-5.6.1.1.tar.gzWe decompress
tar xvf net-snmp-5.6.1.1.tar.gzWe access the folder
We configure…
./configure --with-default-snmp-version="3" --with-sys-contact="rokitoh@red-orbita.com" --with-sys-location="Unknown" --with-logfile="/var/log/snmpd.log" --with-persistent-directory="/var/net-snmp"After a while something like this will appear
---------------------------------------------------------
Net-SNMP configuration summary:
---------------------------------------------------------
SNMP Versions Supported: 1 2c 3
Building for: linux
Net-SNMP Version: 5.6.1.1
Network transport support: Callback Unix Alias TCP UDP IPv4Base SocketBase TCPBase UDPIPv4Base UDPBase
SNMPv3 Security Modules: usm
Agent MIB code: default_modules => snmpv3mibs mibII ucd_snmp notification notification-log-mib target agent_mibs agentx disman/event disman/schedule utilities host
MYSQL Trap Logging: unavailable
Embedded Perl support: disabled
SNMP Perl modules: building -- not embeddable
SNMP Python modules: disabled
Crypto support from: internal
Authentication support: MD5 SHA1
Encryption support: DES AES
---------------------------------------------------------We compile and install
Make && make installMore information
http://net-snmp.sourceforge.net/docs/readmefiles.html
We can leave the template that comes by default to configure rocommunity and the File System. I leave a configuration here.
com2sec paranoid default public
group MyROSystem v1 paranoid
group MyROSystem v2c paranoid
group MyROSystem usm paranoid
group MyROGroup v1 readonly
group MyROGroup v2c readonly
group MyROGroup usm readonly
group MyRWGroup v1 readwrite
group MyRWGroup v2c readwrite
group MyRWGroup usm readwrite
view all included .1
view system included .iso.org.dod.internet.mgmt.mib-2.system
access MyROSystem "" any noauth exact system none none
access MyROGroup "" any noauth exact all none none
access MyRWGroup "" any noauth exact all all none
syslocation Unknown (configure /etc/snmp/snmpd.local.conf)
syscontact Root <root@localhost> (configure /etc/snmp/snmpd.local.conf)
rocommunity redorbita
#Aqui incluiremos los discos del servidor, para verlos: df -h
disk /
disk /home
disk /var
disk /usrGreetings, rokitoh!!
Comments