SNMP is not included by default in App Layering (or Unidesk version 2 or 3). For the rest of this article, whenever we say App Layering ELM, the same information also applies to the Unidesk MA and CachePoints.
To get it installed, your ELM will need Internet access. Run this to download and install the package:
# yum install net-snmp
# yum install net-snmp-utilsIf you have other mechanisms for downloading and installing net-snmp and net-snmp-utils, those are also acceptable, but see below for specifics. "yum" is simply the most convenient method.
There is no App L ayering MIB, so all you can get from SNMP is the standard Linux performance counters. Also, the default configuration does not contain security, so you ned to make sure you at least provide a community string to minimally secure the server. All of the normal SNMP configuration options are available on the ELM, so you can configure and secure your instance however you need to.
Here's a recipe from a customer for installing SNMP on the ELM, where you have to download and configure SNMP yourself:
SSH via putty or another tool to the ELM.
Login as: root
Password: set during initial configuration
# yum install net-snmpanswer Y to all questions
# yum install net-snmp-utilsanswer Y to all questions
# snmpconf -g basic_setupSelect 1 or corresponding # to use this template: 1: /etc/snmp/snmpd.conf
Answer remaining questions as they pertain to your environment until complete.
Once you finish this run the following command to copy the snmpd.conf to the running location:
# cp ./snmpd.conf /etc/snmp/snmpd.confSelect Y to overwrite
Then Run
# chkconfig snmpd on
# service snmpd startOr reboot the ELM.
You may need to configure the firewall rules to allow traffic on ports 161 and 162 as well. In the ELM, the commands are as follows (they are unnecessary on Unidesk V2/V3):
firewall-cmd --zone=public --add-port=161/udp --permanent
firewall-cmd --zone=public --add-port=161/tcp --permanent
firewall-cmd --zone=public --add-port=162/udp --permanent
firewall-cmd --zone=public --add-port=162/tcp --permanent
firewall-cmd --reloadNow you should be able to setup SNMP Monitoring as long as you filled out the configuration correctly.
If you do not have Internet access from the ELM or cannot run Yum in your environment, you will need to manually download and install the applicable RPM packages before starting the configuration above. You will need the following four packages:
net-snmp-libs
net-snmp-agent-libs
net-snmp
net-snmp-utilsYou can get them from any RedHat RPM mirror site, like
http://mirror.as24220.net/pub/centos/7/updates/x86_64/Packages/. Get those downloaded and copied into the ELM, using any SCP tool. Then login as root, CD to the folder where you put the RPM files, and run the following (the exact package names may differ):
rpm -Uvh net-snmp-libs-5.7.2-33.el7_5.2.x86_64.rpm
rpm -Uvh net-snmp-agent-libs-5.7.2-33.el7_5.2.x86_64.rpm
rpm -Uvh net-snmp-5.7.2-33.el7_5.2.x86_64.rpm
rpm -Uvh net-snmp-utils-5.7.2-33.el7_5.2.x86_64.rpmThen proceed with snmpconf as above.
Please note that net-snmp may state that it requires mysql-libs. Although the exact package mysql-libs is not installed, the contents and capabilities of it are installed with the MySQL packages on the ELM. If you are prompted by "yum" to install mysql-libs or mariadb-libs, say no. You will then need to manually downlodad the RPM packages and proceed as below. Unfortunately, yum does not have the ability to ignore a dependency.
If you are manually installing net-snmp from a downloaded RPM and it complains about needing mysql-libs, add the "--nodeps" parameter to the beginning of the rpm command line.
To test SNMP after installing and configuring it, assuming youcreated a read-only community string called "public", you can run this command:
snmpwalk -c public -localhost -v2c
If the SNMP daemon is running, you will get output.