Monitoring the network with SNMP

Presents a table of OID trees that you can poll using SNMP Get.

Simple Network Management Protocol (SNMP) collects information from network devices, such as servers, printers, hubs, switches, and routers on an Internet Protocol (IP). SNMP employs addresses for network devices using a hierarchical numbering system called Object Identifiers (OID). The following table provides OID addresses for polling in SNMP to monitor API Connect servers.

Note:
  • Only SNMP v2 and SNMP v3 are supported. However, it is not recommended to enable SNMP v2. Instead, configure SNMPv3 as shown in Configuring SNMPv3, and then enable it as shown in Enabling SNMP.
  • If the server has two or more network interfaces, the SNMP request is sent only to the first network interface.
  • SNMP is disabled by default for all hosts.
  • This information applies to API Connect deployments in VMware environments. It does not apply to Kubernetes deployments.

Each entry in the table represents many individual items. Use snmpwalk or another SNMP polling utility to see the complete list. You can poll the following OID trees:

Table 1. Default SNMPv2 configuration
OID SNMP Name Notes
.1.3.6.1.2.1.1

SNMPv2-MIB::system

 
.1.3.6.1.2.1.2

IF-MIB::interfaces

 
.1.3.6.1.2.1.4

IP-MIB::ip

 
.1.3.6.1.2.1.5

IP-MIB::icmp.

 
.1.3.6.1.2.1.6

TCP-MIB::tcp

 
.1.3.6.1.2.1.7

UDP-MIB::udp

 
.1.3.6.1.2.1.11 SNMPv2-MIB::snmp  
.1.3.6.1.2.1.25.1

HOST-RESOURCES-MIB::hrSystem

Excluding .1.3.6.1.2.1.25.1.3 HOST-RESOURCES-MIB::hrSystemInitialLoadDevice

Excluding .1.3.6.1.2.1.25.1.4 HOST-RESOURCES-MIB::hrSystemInitialLoadParameters

.1.3.6.1.2.1.25.2

HOST-RESOURCES-MIB::hrStorage

 
.1.3.6.1.2.1.25.3

HOST-RESOURCES-MIB::hrDevice

 
.1.3.6.1.4.1.2021.4

UCD-SNMP-MIB::memory

 
.1.3.6.1.4.1.2021.10

UCD-SNMP-MIB::laTable

CPU Load Average
.1.3.6.1.4.1.2021.11

UCD-SNMP-MIB::systemStats

 

Configuring SNMPv3

From an OVA shell prompt as root edit the file /etc/snmp/snmpd.conf so that its content is:

createUser readOnlyUser SHA authpassphrase AES privpassphrase
rouser readOnlyUser
agentAddress udp:161,udp6:[::1]:161
  • Replace authpassphrase with the passphrase to be used for authentication,
  • Replace privpassphrase with the passphrase to be used for privacy (encryption) of the communications.

Enabling SNMP

It is not recommended to start SNMP without first configuring it for SNMPv3. See Configuring SNMPv3.

Enable SNMP on each individual OVA node with the following commands from an OVA shell prompt as root:

systemctl start snmpd
systemctl enable snmpd

Sample output:

root@mgmt:~# systemctl start snmpd
root@mgmt:~# systemctl enable snmpd
snmpd.service is not a native service, redirecting to systemd-sysv-install
Executing /lib/systemd/systemd-sysv-install enable snmpd
insserv: warning: current start runlevel(s) (empty) of script `snmpd' overrides LSB defaults (2 3 4 5).
insserv: warning: current stop runlevel(s) (0 1 2 3 4 5 6) of script `snmpd' overrides LSB defaults (0 1 6).

Disabling SNMP

Disable SNMP on each individual OVA node with the following commands from an OVA shell prompt as root:

systemctl stop snmpd
systemctl disable snmpd

Sample output:

root@mgmt:~# systemctl stop snmpd
root@mgmt:~# systemctl disable snmpd
snmpd.service is not a native service, redirecting to systemd-sysv-install
Executing /lib/systemd/systemd-sysv-install disable snmpd
insserv: warning: current start runlevel(s) (empty) of script `snmpd' overrides LSB defaults (2 3 4 5).
insserv: warning: current stop runlevel(s) (0 1 2 3 4 5 6) of script `snmpd' overrides LSB defaults (0 1 6).

Checking SNMP status

Check whether SNMP is enabled on each individual OVA node with the following commands from an OVA shell prompt:

systemctl status snmpd

Sample output when SNMP is enabled and running:

apicadm@mgmt:~$ systemctl status snmpd
  snmpd.service - LSB: SNMP agents
   Loaded: loaded (/etc/init.d/snmpd; bad; vendor preset: enabled)
   Active: active (running) since Wed 2019-02-06 03:53:02 UTC; 2 days ago
     Docs: man:systemd-sysv-generator(8)
    Tasks: 1
   Memory: 6.0M
      CPU: 3min 1.641s
   CGroup: /system.slice/snmpd.service
           └─1366 /usr/sbin/snmpd -Lsd -Lf /dev/null -u snmp -g snmp -I -smux mteTrigger mteTriggerConf -p /run/snmpd.pid
...

Sample output when SNMP is stopped and disabled:

root@mgmt:~# systemctl status snmpd
   snmpd.service - LSB: SNMP agents
   Loaded: loaded (/etc/init.d/snmpd; bad; vendor preset: enabled)
   Active: inactive (dead)
     Docs: man:systemd-sysv-generator(8)
...