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

Leave a Reply

RHCSA7: Task of the day

Allowed time: 15 minutes.
Get an iso image of CentOS 7 (or a DVD) and set up a local repository.

RHCE7: Task of the day

Allowed time: 10 minutes.
Set up a caching-only DNS server to forward DNS queries.

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

Archives