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 127.0.0.1
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
success
# firewall-cmd --reload
success

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 (1 votes, average: 5.00 out of 5)
Loading...

Leave a Reply

Be the First to Comment!

Notify of
wpDiscuz

RHCSA7: Task of the day

Allowed time: 5 minutes.
Create a user called tom. Create a directory named /private. Use an acl to only allow access (rwx) to tom to the private directory.

RHCE7: Task of the day

Allowed time: 10 minutes.
Configure a system to forward all email to a central mail server at 192.168.1.1 (change the IP address accordingly).

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 ...