SNMP installation and configuration use to monitor environment

SNMP – Simple Network Management protocol which is used to Monitor Networking devices, Linux Servers, Windows Servers, Storage Devices (SAN, NAS and Unified Storage) any devices which are SNMP enabled. This article will help you SNMP installation and configuration in various Operating systems such as Redhat Enterprise Linux, Centos, Fedora, Windows and Netapp Storage Devices.

Advantages of SNMP

  • SNMP developed based on networking standards it simply works in TCP/IP
  • It’s a portable software very easy and simple to install
  • Lightweight application
  • Agent less monitoring is most preferable in enterprise environments, SNMP fulfill this feature

SNMP Service profile

  • Daemon/Service Name: snmpd
  • Config file path: /etc/snmp/snmpd.conf
  • Installation Package: net-snmp*
  • Port Number: 161

How to SNMP installation and configuration in RHEL 7, Centos 7 and Fedora.

Installing SNMP via yum command

[root@Techtutorials ~]# yum install net-snmp*

Installed:
  net-snmp-devel.x86_64 1:5.7.2-20.el7                                 net-snmp-utils.x86_64 1:5.7.2-20.el7

Dependency Installed:
  elfutils-devel.x86_64 0:0.160-1.el7           elfutils-libelf-devel.x86_64 0:0.160-1.el7   gdbm-devel.x86_64 0:1.10-8.el7
  lm_sensors-devel.x86_64 0:3.3.4-11.el7        perl-ExtUtils-Install.noarch 0:1.58-285.el7  perl-ExtUtils-MakeMaker.noarch 0:6.68-3.el7
  perl-ExtUtils-Manifest.noarch 0:1.61-244.el7  perl-ExtUtils-ParseXS.noarch 1:3.18-2.el7    perl-Test-Harness.noarch 0:3.28-2.el7
  perl-devel.x86_64 4:5.16.3-285.el7            popt-devel.x86_64 0:1.13-16.el7              pyparsing.noarch 0:1.5.6-9.el7
  rpm-devel.x86_64 0:4.11.1-25.el7              systemtap-sdt-devel.x86_64 0:2.6-8.el7       tcp_wrappers-devel.x86_64 0:7.6-77.el7

Complete!

Verify SNMP is installed correctly

[root@Techtutorials ~]# rpm -qa |grep snmp
net-snmp-libs-5.7.2-20.el7.x86_64
net-snmp-5.7.2-20.el7.x86_64
net-snmp-devel-5.7.2-20.el7.x86_64
net-snmp-agent-libs-5.7.2-20.el7.x86_64
net-snmp-utils-5.7.2-20.el7.x86_64

Enable and Start SNMP services

[root@Techtutorials ~]# systemctl enable snmpd
ln -s '/usr/lib/systemd/system/snmpd.service' '/etc/systemd/system/multi-user.target.wants/snmpd.service'
[root@Techtutorials ~]# systemctl start snmpd
[root@Techtutorials ~]# systemctl status snmpd
snmpd.service - Simple Network Management Protocol (SNMP) Daemon.
   Loaded: loaded (/usr/lib/systemd/system/snmpd.service; enabled)
   Active: active (running) since Fri 2016-08-05 12:53:46 IST; 5s ago
 Main PID: 3210 (snmpd)
   CGroup: /system.slice/snmpd.service
           └─3210 /usr/sbin/snmpd -LS0-6d -f

Aug 05 12:53:46 Techtutorials.arkit.co.in snmpd[3210]: NET-SNMP version 5.7.2
Aug 05 12:53:46 Techtutorials.arkit.co.in systemd[1]: Started Simple Network Management Protocol (SNMP) Daemon..

SNMP configuration in Linux

[root@Techtutorials ~]# cp /etc/snmp/snmpd.conf /etc/snmp/snmpd.bak
[root@Techtutorials ~]# vi /etc/snmp/snmpd.conf
###############
## ARKIT.CO.IN#
###############
rocommunity arkit 192.168.4.129

# Allow Systems Management Data Engine SNMP to connect to snmpd using SMUX
smuxpeer .1.3.6.1.4.1.674.10892.1

[root@Techtutorials ~]# systemctl restart snmpd
[root@Techtutorials ~]# systemctl status snmpd.service
snmpd.service - Simple Network Management Protocol (SNMP) Daemon.
   Loaded: loaded (/usr/lib/systemd/system/snmpd.service; enabled)
   Active: active (running) since Fri 2016-08-05 15:44:39 IST; 5s ago
 Main PID: 7668 (snmpd)
   CGroup: /system.slice/snmpd.service
           └─7668 /usr/sbin/snmpd -LS0-6d -f
  • rocommunity = Readonly community
  • arkit = community string Name (anything you can give preferable is plain text no special characters)
  • 192.168.4.129 = Destination server which is allowed to query SNMP

Check SNMP is working using below command

[root@Techtutorials ~]# snmpwalk -v2c -H 192.168.4.129 -c arkit

How to configure SNMP community in Netapp Cluster Mode

Enabling SNMP community string in Netapp Cluster mode is 3 steps.

ARKIT-NA::> system snmp community add -community-name ravi -type ro

above command will create snmp community string as ravi readonly in admin server

ARKIT-NA::> system snmp community add -community-name ravi -type ro -vserver VS0

As a example SNMP community string for particular vserver can be created using above command

ARKIT-NA::> system snmp community show

ARKIT-NA
        ro  ravi

That’s SNMP installation and configuration is done successfully in Netapp Cluster mode

Related Articles

rsync command in Linux

SCP command 15 practical examples

rhn-channel command & spacewalk-channel command

RHCSA certification preparation Guide Download

Thanks for your wonderful Support and Encouragement

Ravi Kumar Ankam

My Name is ARK. Expert in grasping any new technology, Interested in Sharing the knowledge. Learn more & Earn More

Leave a Reply

Your email address will not be published. Required fields are marked *