For troubleshooting or hardware monitoring, it may be useful to enable SNMP on the servers in your Oracle Virtual Compute Appliance. While the tools for SNMP are available, the protocol is not enabled by default. This section explains how to enable SNMP with the standard Oracle Linux and additional Oracle Virtual Compute Appliance Management Information Bases (MIBs).
Enabling SNMP on the Management Nodes
- Using SSH and an account with superuser privileges, log into the management node.The data center IP address used in this procedure is an example.
- Locate the necessary
rpm
packages in the mounted directory/nfs/shared_storage
, which resides in theMGMT_ROOT
file system on the Sun ZFS Storage Appliance 7320. The following packages are part of the Oracle Virtual Compute Appliance ISO image downloaded and unpacked on the shared storage during the update process:- ovca-snmp-0.9-1.el6.x86_64.rpm
- net-snmp-libs-5.5-44.0.1.el6.x86_64.rpm
- net-snmp-5.5-44.0.1.el6.x86_64.rpm
- lm_sensors-libs-3.1.1-17.el6.x86_64.rpm
- net-snmp-utils-5.5-44.0.1.el6.x86_64.rpm
- Install these packages by running the following command:
- Create an SNMP configuration file:
/etc/snmp/snmpd.conf
.This is a standard sample configuration: - Enable the
snmpd
service. - If desired, enable the
snmpd
service on boot. - Open the SNMP ports on the firewall.SNMP is now ready for use on this management node. Besides the standard Oracle Linux MIBs, these are also available:
- ORACLE-OVCA-MIB::ovcaVersion
- ORACLE-OVCA-MIB::ovcaSerial
- ORACLE-OVCA-MIB::ovcaType
- ORACLE-OVCA-MIB::ovcaStatus
- ORACLE-OVCA-MIB::nodeTable
Usage examples: - Repeat this procedure on the second management node.
RHEL7: How to disable Firewalld and use Iptables instead. Last updated on August 7, 2017 (113,340 views) - CertDepot. This website is not affiliated or endorsed by Red Hat or VMware. The website content is only free for non-commercial use. Website hosted by OVH, 2 rue Kellermann, 59100 Roubaix, France.
Enabling SNMP on the Compute Nodes
On Oracle Virtual Compute Appliance compute nodes,
net-snmp
and net-snmp-utils
are already installed at the factory, but the SNMP service is not enabled or configured. - Using SSH and an account with superuser privileges, log into the compute node. It can be accessed through the appliance internal management network.
- Create an SNMP configuration file:
/etc/snmp/snmpd.conf
and make sure this line is included: - Enable the
snmpd
service.SNMP is now ready for use on this compute node. - If desired, enable the
snmpd
service on boot. - Repeat this procedure on all other compute nodes installed in your Oracle Virtual Compute Appliance environment.
In order to change Community String of Linux host, you need to access and edit snmpd.conf file and that can be found in /etc/snmp/ on most linux distros.
Before you do that just double check whether SNMP has been installed in server. If not you'll want to grab both the net-snmp and net-snmp-utils packages. If you are not sure about existing Linux Distribution, use this command: cat /etc/*-release
below is the example of getting snmp packages for linux server fall under different Distribution:
below is the example of getting snmp packages for linux server fall under different Distribution:
CentOS 6 or older: yum install net-snmp net-snmp-utils
CentOS 7: dnf install net-snmp net-snmp-utils
Ubuntu: apt-get install snmp
To configure SNMP Follow below mentioned Command
1) Backup original snmpd.conf file
mv /etc/snmp/snmpd.conf /etc/snmp/snmpd.conf.bak
2) Create a new snmpd.conf file and populate it with a single line.
touch /etc/snmp/snmpd.conf
echo 'rocommunity public' > /etc/snmp/snmpd.conf // Replace Public with any keyword that you have planned to configure as Community String
3) Restart the SNMP service.
service snmpd restart
Test with snmpwalk command on local host
snmpwalk –v2c –c public localhost // Dont forgot to change public string with configured key