Enabling the SNMP interface to retrieve hardware information
You can configure Platform Manager to send hardware metrics and other details to any data center management system via SNMP interface.
Before you begin
- Ensure that
netsnmpagentis installed in your system. It is installed by default on IAS with version 1.0.18.0 and higher. To verify, run the command:pip freeze | grep netsnmpagent - Ensure that
snmpd.serviceis in Active state on nodes inhadomain1:[apuser@node0101 root]$ service snmpd.service status Redirecting to /bin/systemctl status snmpd.service ● snmpd.service - Simple Network Management Protocol (SNMP) Daemon. Loaded: loaded (/usr/lib/systemd/system/snmpd.service; enabled; vendor preset: disabled) Active: active (running) since Thu 2019-06-13 13:58:59 CEST; 2 weeks 6 days ago Main PID: 24535 (snmpd) Tasks: 1 Memory: 14.4M CGroup: /system.slice/snmpd.service └─24535 /usr/sbin/snmpd -LS0-6d -f firewalldmust allow traffic on ports 161 and 162 which are used bysnmpd. These ports are open by default. You can verify with the following command, the ports should be listed as in the example:[root@node0101 ~]# DEFAULT_ZONE=$(grep DefaultZone /etc/firewalld/firewalld.conf | cut -d= -f2); grep -A 4 ‘<!--SNMP-->’ /etc/firewalld/zones/$DEFAULT_ZONE.xml <!--SNMP--> <port protocol="tcp" port="161"/> <port protocol="udp" port="161"/> <port protocol="tcp" port="162"/> <port protocol="udp" port="162"/>
About this task
apsnmpagent [-h] {on,off,state}
Enables or disables snmpd.service and magneto-snmp-agent.service on all accessible nodes of hadomain1.
positional arguments:
{on,off,state} Performs enabling/starting, stopping/disabling or checks if snmpd
and magneto-snmp-agent services have consistent state on accessible nodes of hadomain1.
options:
on - enables and starts services
off - stops and disables services
state - collects state of magneto-snmp-agent and snmpd services
optional arguments:
-h, --help show this help message and exit
-s, --snmpd_only Modifies positional argument. If given, action applied only against snmpd.service.You can use the ap config --set snmp to configure SNMP traps as described in Configuring SNMP trap notifications.
On IAS versions 1.0.18.0 and later, the MIB file is available in /usr/share/snmp/mibs/IIAS-MIB.txt on every node.
SNMP traps support
all alerts that are listed with the following command:
ap issues --show_registryTroubleshooting:
- The ap issues <issue id> command output includes the section where the
reason for SNMP configuration failure might be listed:
Processing Status State : CLOSED Log Collection Status : COLLECTED SMTP Status : NOT_APPLICABLE SNMP Status : FAILED SNMP Failure Reason : Incomplete SNMP configuration. Missing: snmp_auth_key Call Home Status : NOT_APPLICABLE - You can use the
ap config --test snmpcommand to test if the SNMP configuration is correct and send a test SNMP notification. The following example shows a failed run, as on the host there was no service to receive the notification and respond:
A successful run looks like the following:[root@e1n1 ~]# ap config --set snmp --snmp_version 3 --snmp_notification_type inform --snmp_auth_key auth.md5 --snmp_auth_protocol 1 Updated successfully [root@e1n1 ~]# ap config --test snmp SNMP connectivity test: FAILED. localhost:33162 - "Timeout" [root@e1n1 ~]#[root@e1n1 ~]# ap config --test snmp 2021-07-16 14:19:00 SNMP connectivity test: SUCCESS. Note: INFORMs are acknowledged, successfully delivered. [root@e1n1 ~]#