RHEL7: How to install a SNMP service.

Share this link

Presentation of SNMP

SNMP stands for Simple Network Management Protocol.
It is a protocol used to monitor servers.

Installation Procedure

Install the SNMP packages:

# yum install -y net-snmp net-snmp-utils

Set up a minimal configuration:

# cd /etc/snmp
# cp -p snmpd.conf snmpd.conf.dist
# echo "rocommunity public">snmpd.conf
# echo "syslocation here" >>snmpd.conf
# echo "syscontact root@localhost" >>snmpd.conf

Activate at boot and start the SNMP service:

# systemctl enable snmpd && systemctl start snmpd

Execute a simple test:

# snmpwalk -v 1 -c public -O e
SNMPv2-MIB::sysDescr.0 = STRING: Linux rhel7.example.com 3.10.0-54.0.1.el7.x86_64 #1 SMP Tue Nov 26 16:51:22 EST 2013 x86_64
SNMPv2-MIB::sysObjectID.0 = OID: NET-SNMP-MIB::netSnmpAgentOIDs.10

If you plan to monitor the machine through a remote server like Cacti, update the firewall configuration:

# firewall-cmd --permanent --add-port=161/udp
# firewall-cmd --reload

Additional Resources

If you want some details about metrics, you can have a look at the net-snmp website.

1 Star2 Stars3 Stars4 Stars5 Stars (6 votes, average: 4.83 out of 5)

Leave a Reply

Please Login to comment
Notify of

Upcoming Events (Local Time)

  1. Jan

    1. 9:00 am - View Details
      CentOS: Dojo, Brussels, Belgium.

RHCSA7: Task of the day

Allowed time: 5 minutes.
Create a new user account called "bob" with password "redhat" and set expiration in one week.

RHCE7: Task of the day

Allowed time: 8 minutes.
Set up an iScsi target based on a block backstore of 100MB called lv_iscsi with basic authentication, ext4 filesystem and standard firewall configuration.

Follow me on Twitter

Poll for favorite RHEL 7 book

What is your favorite RHEL 7 book to prepare RHCSA & RHCE exams?

View Results

Loading ... Loading ...

Poll for most difficult RHCSA 7 topic

What do you think is the most difficult RHCSA 7 topic?

View Results

Loading ... Loading ...

Poll for most difficult RHCE 7 topic

What do you think is the most difficult RHCE 7 topic?

View Results

Loading ... Loading ...